Results 1 to 15 of 15
  1. #1
    3 Star Lounger
    Join Date
    Nov 2003
    Location
    London, Gtr London, England
    Posts
    222
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Mail Merge (2000 (9.0.4402 SR-1))

    I am having a problem inserting multiple data items into a word document using mail merge and linking to Access.

    I have a company say ABC which for instance has 4 claims which I need to list on the same form letter thus:-

    Claim A

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Mail Merge (2000 (9.0.4402 SR-1))

    See HOW TO: Use Mail Merge to Create a List Sorted by Category in Word 2000. It's not trivial, read carefully and make a backup copy of your merge document before modifying it.

  3. #3
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Mail Merge (2000 (9.0.4402 SR-1))

    Hans gave you one option - we typically solve this problem by doing Automation to collect the information from Access and then stuff it into a Word template. That approach requires using fairly extensive VBA however, and requires that you know the object models of both Word and Access. If you want to pursue that approach post back.
    Wendell

  4. #4
    3 Star Lounger
    Join Date
    Nov 2003
    Location
    London, Gtr London, England
    Posts
    222
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mail Merge (2000 (9.0.4402 SR-1))

    I have been looking at the "How to:" on the Microsoft Help and Support, but to date can't make it work. Would be most grateful if you could advise me of your VB method, although I'm not that au fait with the Word side.

    Cheers,

    Niven

  5. #5
    3 Star Lounger
    Join Date
    Nov 2003
    Location
    London, Gtr London, England
    Posts
    222
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mail Merge (2000 (9.0.4402 SR-1))

    Many thanks for guiding me to the MS "How To" web page.

    I'm sorry to hit you with this again, but I'm having great trouble in getting it to work. I don't know if you've tried the "How To's" method, but if so I wonder if you can point me as to where I'm going wrong. I understand the logic behind the method, however when I apply the method as laid out, even using the same test data, the merge document returns a mixture of code and data and not in anything like the layout of the example.

    I've attached the Word data document as well as the word template and output document.

    Cheers,

    Niven
    Attached Files Attached Files

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Mail Merge (2000 (9.0.4402 SR-1))

    As the MSKB article mentions, you must insert the field brackets { } by pressing Ctrl+F9. Typing them in yourself, as you have done in the "template" document, won't work - the result will be just text, not a field.

    I have attached the modified version. Press Alt+F9 to toggle field codes on and off. I have detached the data source, so you must run step 2 of the Mail Merge Helper again to select the data document.
    Attached Files Attached Files

  7. #7
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Mail Merge (2000 (9.0.4402 SR-1))

    Let me suggest you take a look at our Automation Tutorial as a starting point. It includes a number of links to MSKB articles that give further examples of how to construct Word documents from an Access database. In particular, <!mskb=210271>Microsoft Knowledge Base Article 210271<!/mskb> will likely give you a feel for the process of simulating a Word merge using Automation.
    Wendell

  8. #8
    3 Star Lounger
    Join Date
    Nov 2003
    Location
    London, Gtr London, England
    Posts
    222
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mail Merge (2000 (9.0.4402 SR-1))

    You probably thought this one had away!

    I've finally managed to get this to output the data in a list format and also, with a lot of thought, have managed to put in some other fields throughout the document.

    I'm now tearing my hair out over how to get all the items concerned, 7 in total, to output in an alphabetical order. I have added a line number field for each item (1 through to 7) and sorted the access table by company first, then line number second, so that for intents and purposes the table is in the order that I would like to see it on the Word document. The output starts out ok and then some way down the mailmerge the list decides to jumble itself up as it were, then continues ok and then does it again!

    There must be something else I need to do. Can you help please?

    Cheers,

    Niven <img src=/S/mad.gif border=0 alt=mad width=15 height=15>

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Mail Merge (2000 (9.0.4402 SR-1))

    I think we'd have to see the database and merge document.

  10. #10
    3 Star Lounger
    Join Date
    Nov 2003
    Location
    London, Gtr London, England
    Posts
    222
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mail Merge (2000 (9.0.4402 SR-1))

    Attached in the Zip file, trust in order.

    Cheers,

    Niven
    Attached Files Attached Files

  11. #11
    3 Star Lounger
    Join Date
    Nov 2003
    Location
    London, Gtr London, England
    Posts
    222
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mail Merge (2000 (9.0.4402 SR-1))

    Further, to my last post, the reason for the end of report records in the merge table is that the last company in the mailmerge only printed as far as the list of items and didn't print the final body of text. It's a fudge, but it works. You may have another suggestion.

    Cheers again,

    Niven

  12. #12
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Mail Merge (2000 (9.0.4402 SR-1))

    Change the section break after page 1 to a hard page break (Ctrl+Enter) to avoid the problem with the last company. You can then remove all those ZZZ records.

    Records in an Access table are stored in no particular order. Sorting the table in Access is for display only, it doesn't change the way the records are stored and retrieved. There are two ways to get the sort order you want:
    - Create a query based on the table, sorted on Company Name and Line No, and use this query as data source for the mail merge, or
    - Create a primary key in the table on the combination of Company Name and Line No. The primary key is the default sort order of a table. (You must have removed the ZZZ records for this.)

  13. #13
    3 Star Lounger
    Join Date
    Nov 2003
    Location
    London, Gtr London, England
    Posts
    222
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mail Merge (2000 (9.0.4402 SR-1))

    Nearly there!

    I've changed the merge to run via a query, which is perfect - many thanks for that as with all your other help. However, I've put the hard page break in in place of the section break, but am still not getting the final body of text to print. Is there anything else I need to do?

    Cheers,

    Niven

  14. #14
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Mail Merge (2000 (9.0.4402 SR-1))

    I thought I had it working OK, but apparently it doesn't. I think you'll need the dummy records at the end after all.

    It would probably be easier to do this as a report in Access, using the built-in sorting and grouping features.

  15. #15
    3 Star Lounger
    Join Date
    Nov 2003
    Location
    London, Gtr London, England
    Posts
    222
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mail Merge (2000 (9.0.4402 SR-1))

    Have gone back to the dummy records method.

    Many thanks for your help and patience in this matter. I don't know if it's just me, but I don't think I've come across a more cumbersome and time consuming project for something that seems so simple. Although they're from the same camp, I suspect it is just down to what are two different app's doing their best to communicate with each other!

    Cheers again,

    Niven <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

Posting Permissions

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