objWordApp.ActiveDocument.SaveAs txtOutputfile.Text

N

Naveen

We have a application that initializes a word instance to perform a mail
merge. After the merge while executing the following line

objWordApp.ActiveDocument.SaveAs txtOutputfile.Text

We receive the Error message “Method 'SaveAs' of object '_Document' failedâ€
We are not sure why it does that.

Does the template have any issues? If so how do we correct it?

Any help will be appreciated


Thanks
Naga
 
D

Doug Robbins - Word MVP

You need to specify the path and the filename as a string with quote marks.
Take a look at the SaveAs item in the VBE Help file for examples.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
Top