Results 1 to 1 of 1

Thread: Mail Merge

  1. #1
    Join Date
    Nov 2004

    Question Unanswered: Mail Merge

    I have set up a mail merge document and I can run a query and then follow the link of the document through my computer and open the mail merge document and it asks me do I want to run the SQL command and thats fine. I click yes and everything is fine.
    However when I create a seperate form and and a command button to automate it, the problems start.

    The code I use is:

    DoCmd.OpenQuery "qryPrintLetter"
    Dim appWord As Object
    Set appWord = CreateObject("Word.Application")
    appWord.Visible = True
    Dim objDoc As Object
    Set objDoc = appWord.Documents.Open("C:\Databases\Access Databases\MergeLetters")
    The query 'qryPrintLetter' updates value in in a table called 'TempMembers' which the document mail merges with. When you click the command button to perform this code it opens the word document but the names and address dont appear. It also doesnt ask you if you want to perform the mail merge SQL query.

    Any help would be greatly appreciated.
    Last edited by caoimhincryan; 07-10-06 at 11:21.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts