Word automation 'SaveAs'

E

emcz

I just want to save the word file as a different file name, using the SaveAs
method
in Document, I am using C++.

_Document doc;
...
COleVariant saveasFile("myfile.doc");
COleVariant saveasFormat((short)wdFormatDocument);
...
doc.SaveAs(&saveasFile, &saveasFormat, ...);

I am not familiar what I should initialize for the rest of parameters, I
always get
some run time exception.

Does any one have sample code?

TIA
 

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