Word 2007 File Seems To Be Deleted When You Open And Save It Using DSOFramer |
If you are using DSOFramer sample to host Office Documents, and tried to open and save Word 2007 documents in this manner, guess what !! the file seems to be deleted ! Using Process Monitor from sysinternals it was noted that files were being moved to a temp directory and then while saving it, changes were being made in it..strange! The DSOFramer code had the IPersist:Save() is returning S_OK, Looking at the Word 2007 code, it seemed like a bug in the implementation of IPersist:Save() Here is the modified DSOFramer code
if (SUCCEEDED(hr = m_pole->QueryInterface(IID_IPersistFile, (void**)&pipfile))) { hr = pipfile->Save(pwszFile, FALSE); pipfile->Release(); //CODE MODIFICATION START if (SUCCEEDED(hr) && !FFileExists(pwszFile)) { //We should come here only in case of Word 2007. CopyFileW(pwszCurPath, pwszFile, TRUE); } //CODE MODIFICATION END } |
VC中进行office编程--操作word
http://www.cppblog.com/wanhhf/archive/2006/02/20/3355.html
微软最新版本是2005 1.2
Visual C++ ActiveX Control for hosting Office documents in Visual Basic or HTML
在B/S中用DSO Framer OCX + Excel 解决复杂的报表问题 有源代码
http://www.dsoframer.cn/default.asp
DSOFramer控件文档上传到服务器处理页面后,怎么解析数据
http://www.dsoframer.com/forumdisplay.php?fid=2&page=1
DSOFramer 控件修改成功
基于Asp.Net 2.0(C#)和SQL Server 2005使用DSOFramer全攻略
Integrating Microsoft Word in your .NET applications