Reply
 
Thread Tools Display Modes
  #1   Report Post  
Naveen
 
Posts: n/a
Default objWordApp.ActiveDocument.SaveAs txtOutputfile.Text

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




  #2   Report Post  
Doug Robbins - Word MVP
 
Posts: n/a
Default objWordApp.ActiveDocument.SaveAs txtOutputfile.Text

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

"Naveen" wrote in message
...
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






Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:14 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"