S
Stepan
I would like to save a _copy_ of the Word 2007 document. There is no
function in object model like Word::_Document->SaveCopyAs.
The good resolution for Word 2003 is to use IPersistFile, this was
suggested by Eugene Starostin in 2004 (http://groups.google.ru/group/
microsoft.public.office.developer.com.add_ins/browse_thread/thread/
659545eb64b4787d).
CComPtr<IPersistFile> persistFile =
QueryInterface<IPersistFile>( document );
persistFile->Save( newFileName, false );
persistFile->SaveCompleted( newFileName );
But it does not work for Word 2007 for loaded documents. This just
saves document to previous storage ignoring newFileName.
I tried to use IPersistStorage, but this interface saves to IStorage
the document without unsaved changes.
Can anybody solve this problem?
Stepan.
function in object model like Word::_Document->SaveCopyAs.
The good resolution for Word 2003 is to use IPersistFile, this was
suggested by Eugene Starostin in 2004 (http://groups.google.ru/group/
microsoft.public.office.developer.com.add_ins/browse_thread/thread/
659545eb64b4787d).
CComPtr<IPersistFile> persistFile =
QueryInterface<IPersistFile>( document );
persistFile->Save( newFileName, false );
persistFile->SaveCompleted( newFileName );
But it does not work for Word 2007 for loaded documents. This just
saves document to previous storage ignoring newFileName.
I tried to use IPersistStorage, but this interface saves to IStorage
the document without unsaved changes.
Can anybody solve this problem?
Stepan.