Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    Oct 2002
    Location
    Leamington Spa, Warwickshire, England
    Posts
    136
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Advanced Mail Merge (XP )

    Hi

    i have been asked to do a mail merge, which is easy enough except they want charges to appear in atable listing the charges. If the client hasn't got a particular charge in a filed they don't want the text decribing the charge to appear. Also, if certain charges appear they want certain txt to appear at the end of the doc.

    Any ideas?

    michelle

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

    Re: Advanced Mail Merge (XP )

    Hi Michelle,

    What is the data source for your merge? In other words are you getting your data from a Word document, an Excel workbook, an Access database, or some other kind of document? Also, are you doing this for a number of customers in a batch, or will it be used on an ad-hoc basis for one customer? What you've been asked to do is fairly complex using Mail Merge, and you may find that using VBA in Word, or using Automation from an application such as Access may be a better approach.
    Wendell

  3. #3
    2 Star Lounger
    Join Date
    Oct 2002
    Location
    Leamington Spa, Warwickshire, England
    Posts
    136
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Advanced Mail Merge (XP )

    The information was taken from an oracle database, the reports can't be written any mor as our oracle systems are being disbanded. it was a comma delimited file which I have converted to an excel spreadsheet. as far as i am aware its a one off (this year!) as there should be anew one next year.

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

    Re: Advanced Mail Merge (XP )

    Lines that remain empty in a mail merge will be suppressed. If you want to suppress a field on a certain condition, you can use an IF field:

    { IF { MERGEFIELD Charge } = "" "" "{MERGEFIELD Description }" }

    The brackets { } are field brackets. You should NOT type them yourself, but insert them by pressing Ctrl+F9 or by using Insert | Field...

    I'm not sure how your second wish can be implemented, it may be possible to use SET fields. Perhaps someone will have a suggestion if you could provide more details.

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

    Re: Advanced Mail Merge (XP )

    Do you have thousands of these to do, hundreds, or less than 100? If you have less than 100, I would suggest doing them manually. If you have thousands to do, I would probably write some VBA code to take the data and stuff it into a template document that contains the basic boiler-plate. But it would not be a trivial exercise, even if you are pretty proficient in Word and VBA. You might also consider the possibility of an Access report - sometimes it can handle tablular data pretty well. If you want to attach a sample Word mock-up of what your clients are after, we could make some more detailed suggestions.
    Wendell

  6. #6
    2 Star Lounger
    Join Date
    Oct 2002
    Location
    Leamington Spa, Warwickshire, England
    Posts
    136
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Advanced Mail Merge (XP )

    Hi

    I have used If....Then....Else

    That works except I can't get it in a table. So I've used borders.

    Thanks for all your help!

    Michelle

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

    Re: Advanced Mail Merge (XP )

    <!mskb=292121>Microsoft Knowledge Base Article 292121<!/mskb> might help you in putting your field codes into a table cell. The trick with mergeing into a table or doing a catalog merge is to use the { NextRecord } field. You can see an example of that by creating a merge that does labels - it creates a table.
    Wendell

Posting Permissions

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