Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / February 2007

Tip: Looking for answers? Try searching our database.

merging with query in access 2003

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jbc - 09 Feb 2007 15:42 GMT
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
jbc - 09 Feb 2007 17:24 GMT
I also want to note that the code should open access if necessary and run the
merge.

thanks.

> Hi,
>
[quoted text clipped - 4 lines]
>
> jbc
Doug Robbins - Word MVP - 09 Feb 2007 19:07 GMT
It might help if you posted the code that you were using and indicated what
line of code was highlighted when the error occurs.

Signature

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

>I also want to note that the code should open access if necessary and run
>the
[quoted text clipped - 11 lines]
>>
>> jbc
jbc - 09 Feb 2007 19:37 GMT
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

> It might help if you posted the code that you were using and indicated what
> line of code was highlighted when the error occurs.
[quoted text clipped - 14 lines]
> >>
> >> jbc
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.