Mail merge to letter in Word 2007

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jolaunt
    New Member
    • Apr 2010
    • 16

    #1

    Mail merge to letter in Word 2007

    I would like to set up a button on an input form which will merge the contact information from the current record into a word document. I have set up the merge fields in the word document from a query. The word document is a letterhead and is saved in the following location:

    X:\AVK UK\Global Reports - DCF's etc\Customer Complaints\Lett erhead DO NOT USE


    I have set up a query which pull the data needed for the merge into a query called:

    "qryCustomerCon tact"

    This query has the following fields:

    CC Number (set up to look at current form record only)
    Customer Name
    Address1
    Address2
    Address3
    Town
    County
    Postcode
    Contact Name
    Position


    I want to be able to press a button on my form which opens the word document and updates the fields.

    I know how to use mail merge from access but have never made this process automatic using vba so are in desperate need of HELP.

    I look forward to receiving your replies.

    If you need anymore information about my database please just ask.

    Thank you
  • patjones
    Recognized Expert Contributor
    • Jun 2007
    • 931

    #2
    I had a feeling that this topic seemed familiar to me. Indeed, we looked at this issue back in April.

    Are you still using the code you posted in the first thread, and if so, is Word at least opening up?

    As I pointed out at then you need to tell Word where to look. It seems like it's a question of Word not being able to find where your data is.

    Pat

    Comment

    • jolaunt
      New Member
      • Apr 2010
      • 16

      #3
      I am at a complete loss as to who to make this work. I think I need to start from scratch with this coding.

      I have been able to get word to open the correct document but like you say it doesn't seem to know to look in the query to update the fields.

      Any help at all on how to make this happen would be FANTASTIC!

      As I have mentioned before I am quite new to vba coding and think I am being a bit ambious in trying to figure this one out myself.

      Thanks
      Jo

      Comment

      • patjones
        Recognized Expert Contributor
        • Jun 2007
        • 931

        #4
        Well let's talk this out a little bit.

        As I think I mentioned in the other thread, my feeling is that this doesn't have as much to do with the VBA as it does with what is going in the Word file. The purpose of the VBA is to open the Word document, which it does. I think the problem may just have to do with the Word document.

        I have used the mail merge feature in Word quite a bit, but I have discovered that there are a couple steps to take to make sure the merge happens correctly. Namely, it is necessary to take steps in the Word document:
        1. Select Recipients > Use Existing List...
        2. Insert Merge Field
        3. Update Labels
        4. Preview Results

        It seems like you have done the first two steps already. Perhaps when the document opens you need to update the labels and preview the results? Since VBA is available in Word, this process could be automated, if in fact the issue is as simple as this.

        Pat

        Comment

        • jolaunt
          New Member
          • Apr 2010
          • 16

          #5
          Thanks - I have managed to get it work now!!

          You have been a great help.

          Comment

          Working...