J
Jonathan Parminter
Hi, the code below works for access version 2000. But for
Access 2002 it opens Word and then shows the Select Table
dialog. I want the code to set the data source for the
mail merge.
What do I need to add in the following code to ensure that
another session of the access database is not started and
that the Select Table dialog is not shown?
strDbName = CurrentDb.Name
With wdDoc.MailMerge
.MainDocumentType = 1
.OpenDataSource Name:=strDbName, _
LinkToSource:=True, _
AddToRecentFiles:=True, _
ReadOnly:=True, _
Revert:=False, _
Connection:="QUERY " & mconMailoutQuery
End With
Thanks, any ideas or suggestions appreciated![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Cheers
Jonathan
Access 2002 it opens Word and then shows the Select Table
dialog. I want the code to set the data source for the
mail merge.
What do I need to add in the following code to ensure that
another session of the access database is not started and
that the Select Table dialog is not shown?
strDbName = CurrentDb.Name
With wdDoc.MailMerge
.MainDocumentType = 1
.OpenDataSource Name:=strDbName, _
LinkToSource:=True, _
AddToRecentFiles:=True, _
ReadOnly:=True, _
Revert:=False, _
Connection:="QUERY " & mconMailoutQuery
End With
Thanks, any ideas or suggestions appreciated
Cheers
Jonathan