merging with query in access 2003

J

jbc

Hi,

I would like to automate merging between word and access 2003. I had code
that worked in 2000, but now I'm getting error messages.

Thanks.

jbc
 
J

jbc

I also want to note that the code should open access if necessary and run the
merge.

thanks.
 
D

Doug Robbins - Word MVP

It might help if you posted the code that you were using and indicated what
line of code was highlighted when the error occurs.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
J

jbc

Doug,

This is the code I'm using. I recorded it in Word. I'm getting a dialog
box that asks me to confirm data source. When I choose MS Access Databases
with DDE it works.

ActiveDocument.MailMerge.OpenDataSource Name:= _
"C:\Documents and Settings\jbc\My Documents\Member\Membership.mdb" _
, ConfirmConversions:=True, ReadOnly:=False, LinkToSource:=True, _
AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:="", _
WritePasswordDocument:="", WritePasswordTemplate:="", Revert:=False, _
Format:=wdOpenFormatAuto, Connection:= _
"QUERY qryRenewalForm1", SQLStatement:= _
"SELECT * FROM [qryRenewalForm1]", SQLStatement1:="", _
SubType:=wdMergeSubTypeOther

With ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
.Execute
End With

Thanks.

jbc
 

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