problem while saving word document

S

saket

Hi

i have a preculiar problem while using
WordApp.Dialogs(Word.WdWordDialog.wdDialogFileSaveAs).show



if my file name is xxxa;b the .show saves the file as xxxa.doc;b.doc .
is there any way by which i can avoid the .doc coming twice.



now even if i pass xxxa;b.doc as default file name as a parameter the
document is stored as xxxa.doc;b.doc, is there any setting or method i can
use by which i would be able to save the document as xxxa;b.doc





thanks in advance
 
S

Stepan

Try
Document = WordApp->GetActiveDocument();
Document.SaveAs( L"<path>\xxxa;b.doc" );

This will save your document invisible for user. You can use
IOleCommandTarget with OLECMDID_SAVEAS and OLECMDEXECOPT_PROMPTUSER to
show a dialog.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top