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
 

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