R
richardb
My Access database controls a Mail Merge Job in Word. After generating the
data, Access opens the Word document with these lines of code in a module:
Set objWord = GetObject("G:\Access Projects\MyWordDoc.doc", "Word.Document")
objWord.Application.Visible = True
objWord.RunAutoMacro wdAutoOpen
In the Word document the Sub AutoOpen Prints the mail merge job. My AutoOpen
code ends with ActiveDocument.Close wdDoNotSaveChanges. Unfortunately, all
this does is to close the document. What I want is to completely close out
Word and return my screen to Access where I left off. I have searched, but
can't figure out how to do this. Would appreciate assistance.
data, Access opens the Word document with these lines of code in a module:
Set objWord = GetObject("G:\Access Projects\MyWordDoc.doc", "Word.Document")
objWord.Application.Visible = True
objWord.RunAutoMacro wdAutoOpen
In the Word document the Sub AutoOpen Prints the mail merge job. My AutoOpen
code ends with ActiveDocument.Close wdDoNotSaveChanges. Unfortunately, all
this does is to close the document. What I want is to completely close out
Word and return my screen to Access where I left off. I have searched, but
can't figure out how to do this. Would appreciate assistance.