Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bypass prompt to save Mail Merge template...

Status
Not open for further replies.

Inquisitor99

Programmer
Aug 25, 2005
24
US
I set up a Mail Merge that will use Word 2000 as the front end and an Access 2000 query as the data source. The merge will be run from a command button on an Access form. Everything works fine, except when I use code to close the Mail Merge template without saving it, I'm still prompted to save it.

Here is the line I'm using to save and close, which I picked up from the following post (
objWordDoc.Save
objWordDoc.Close SaveChanges:=-1


If I try to save it before closing it using code, I get the 'Save As...' dialog box.

Here is the line I'm using to close it without saving it:

doc.Close SaveChanges:=wdDoNotSaveChanges

doc= "path\MailMergeFile.dot"


Does anyone know how to close the Mail Merge template without getting the prompt to save it?

Thanks.
 
objWordDoc.Saved = True
objWordDoc.Close

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top