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 / Mailmerge and Fax / January 2004

Tip: Looking for answers? Try searching our database.

>> Mail Merge from Access

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jonathan Parminter - 19 Jan 2004 20:33 GMT
Hi, using Office XP I am running code in Access for a mail
merge in Word. The code opens Word and then displays the
Select Table dialog. I was hoping to avoid this as I don't
want users to have to make a selection.

I also don't want to open a second instance of Access. I
think that setting Revert to False ensures that only one
session of Access is open.

What do I need to change in the code snippet below to
avoid having the select table dialog display?

   With objMailMerge
       .MainDocumentType = wdFormLetters
       .OpenDataSource Name:=strThisDb, _
               LinkToSource:=True, _
               Revert:=False, _
               Connection:="QUERY qryMailMerge", _
               OpenExclusive:=False
   End With

Thanks, any ideas or suggestions appreciated :-)

Cheers
Jonathan
Cindy M  -WordMVP- - 20 Jan 2004 20:07 GMT
Hi Jonathan,

Best way to get started is to record connecting to the data
in a macro. That will show you which arguments you're missing
in the OpenDataSource method...

> Hi, using Office XP I am running code in Access for a mail
> merge in Word. The code opens Word and then displays the
[quoted text clipped - 7 lines]
> What do I need to change in the code snippet below to
> avoid having the select table dialog display?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep
30 2003)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :-)
Jonathan Parminter - 21 Jan 2004 01:08 GMT
Thanks Cindy.

Cheers
Jonathan
 
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.