J
John Lane
I have the code snipet below that runs Word Mail Merge. 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
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