Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / October 2007

Tip: Looking for answers? Try searching our database.

Doing a MailMerge to Word 2007

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Craig - 27 Oct 2007 17:25 GMT
The code below has worked for years until my client updated their software to
2007. Now the mail merge part is broken. Any ideas?

Set myWord = New Word.Application
   
   myWord.Visible = True
   
   'Start a new main document for the mail merge.
   Set myDoc = myWord.Documents.Open(sFileName)

   With myDoc.MailMerge

       .MainDocumentType = wdFormLetters

       'Set up the mail merge data source.
       sDBPath = CurrentProject.FullName
       .OpenDataSource Name:=sDBPath, SQLStatement:="SELECT * FROM
[qryThankYou]"
       .Destination = wdSendToNewDocument
       .Execute Pause:=False
   End With

   myDoc.Close
Arvin Meyer [MVP] - 27 Oct 2007 17:49 GMT
Where (on what line) does it break?
Signature

Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

> The code below has worked for years until my client updated their software
> to
[quoted text clipped - 20 lines]
>
>    myDoc.Close
 
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.