Mail Merge with Word

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 :)

Cheers
Jonathan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top