View Single Post
  #1   Report Post  
John Lane
 
Posts: n/a
Default Question on Mail Merge from Access

I have the code snipet below that runs Word Mail Merge from Access. When Word
runs, it first opens the "skeleton" Word document, then specializes it with
the query and opens it a second time with the parameters filled in. When the
user closes the document, Word now displays the skeleton document/form. Is
there a way to either not show/hide the first instance, or when the user
closes the 2nd instance, the 1st instance is closed? Thanks.
Set objWord = GetObject(strFilepath)
objWord.Application.visible = True
objWord.MailMerge.OpenDataSource Name:=CurrentDb.Name, LinkToSource:=True,
SQLStatement:=strSQL
objWord.MailMerge.Execute