Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Aug 2015
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    HELP: mailmerge combining several records per page

    Hi guys.

    Im fairly new to building mailmerge with field codes, and I have come so far as to understand the syntax, however I just cannot get the code to work. Im assuming theres an error that I just cannot spot. Will really appreciate some help on this:

    I have a database with the following column headings:

    First names, Identity number, Preferred name, Surname, Title, Advisor, Advisor ID number, broker commission, advice type, contract number, product, provider (in that order)

    What I need is to use a few of these fields to draw up a record of advice for a client, with all off the clients different investments displaying on one letter (contract number), as well as which company it is invested with and the product type. I do not necessarily need the ID number to display but I am using that as key field. When i do the mailmerge it says :Error, invalid op code.

    Here is the code:

    (IF(MERGESEQ)=1"
    ADVICE RECORD
    GOAL OF CLIENT...............................
    TYPE OF ADVICE: FOCUSSED
    ID NO: (MERGEFIELD "Identity_number")

    Company Contract number Product
    " "") (SET ID1 (MERGEFIELD "Identity_number))
    (IF (ID1)<>(ID2)"

    Advice given will be based on a specific need.....
    ...........page break...........

    ADVICE RECORD
    GOAL OF CLIENT...............................
    TYPE OF ADVICE: FOCUSSED
    ID NO: (MERGEFIELD "Identity_number")

    Company Contract number Product
    (MERGEFIELD "Provider") (MERGEFIELD "Contract_number") (MERGEFIELD "Product")" "(MERGEFIELD "Provider") (MERGEFIELD "Contract_number") (MERGEFIELD "Product")") (SET ID2 (MERGEFIELD "Identity number"))

    Would really appreciate some help if anyone can see my mistake. I can attach a sample if necessary.

    Thank you

  2. #2
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts
    To see how to do so with any mailmerge data source supported by Word, check out my Microsoft Word Catalogue/Directory Mailmerge Tutorial at:
    http://windowssecrets.com/forums/sho...merge-Tutorial
    (It's a Sticky thread at the top of this forum)
    The tutorial covers everything from list creation to the insertion & calculation of values in multi-record tables in letters. Do read the tutorial before trying to use the mailmerge document included with it.

    For some worked examples, see the attachments to the posts at:
    http://www.msofficeforums.com/mail-m...html#post23345
    http://www.msofficeforums.com/mail-m...html#post30327
    http://windowssecrets.com/forums/sho...l=1#post928391

    Alternatively, you may want to try one of the Many-to-One Mail Merge add-ins, from:
    Graham Mayor at http://www.gmayor.com/ManyToOne.htm; or
    Doug Robbins at http://bit.ly/1hduSCB

    In addition to a 'Many to One' merge, the latter handles:
    • Merge with Charts
    • Duplex Merge
    • Merge with FormFields
    • Merge with Attachments
    • Merge to Individual Documents
    • Merge, Print and Staple
    Cheers,

    Paul Edstein
    [MS MVP - Word]

Tags for this Thread

Posting Permissions

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