Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Dec 2013
    Thanked 0 Times in 0 Posts

    Mailmerge compare / condition rule


    I have a mailmerge document with the following lines:
    { MERGEFIELD TableStart:LineItem \* MERGEFORMAT }{ MERGEFIELD Description \* MERGEFORMAT }

    { MERGEFIELD TableEnd:LineItem \* MERGEFORMAT }

    Within the data I have a field called 'code' whereby I only want to include items with a certain code. How would I do this and where would I place the correct code within the above preset format?

    Thanks in advance.

  2. #2
    Super Moderator macropod's Avatar
    Join Date
    May 2002
    Canberra, Australian Capital Territory, Australia
    Thanked 470 Times in 387 Posts
    Hi beckyb,

    Your field code suggests you're using a 3rd-party Addin, not just Word's own mailmerge tools. In such cases, it's hard to know how much control you have over their processing. That said, you may be able to skip the non-conforming records by adding a SKIPIF field before the Description mergefield; something along the lines of:
    {SKIPIF {MERGEFIELD Code} <> 12345}
    where 'Code' is the name of the field containing your codes and the 12345 is the code value you want to limit the output to.

    Paul Edstein
    [MS MVP - Word]

Posting Permissions

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