Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Oct 2014
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Possible to have extra text added to a mail merge, if a condition is met?

    Hi,

    I have one master letter that goes to every state, but certain states require that I add additional language to the master letter.

    So intead of creating serveral copies of the letter that will need to be updated if anything ever changes, I'd like to add a formula that says if State = WA, then add this text.

    I probably have 15 states that require specific language to be added to our master letter - some of them are pages long...

    Is this even possible?

    Please help!!!
    Annie

  2. #2
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts
    Yes. This is done with an IF field that tests for the contents a merge field. The link in the previous sentence includes an example using a mergefield for the test. Here is Microsoft's reference on the IF Field.
    Last edited by Charles Kenyon; 2014-12-11 at 16:21.
    Charles Kyle Kenyon
    Madison, Wisconsin

  3. #3
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts
    Adding conditional text to a mailmerge is quite easy. You can use the 'If...Then...Else...' dialogue from the Rules dropdown, or you can encode the fields manually. For example:
    {IF{MERGEFIELD STATE}= "AK" "Text for AK"}
    {IF{MERGEFIELD STATE}= "WA" "Text for WA"}
    etc., or:
    {IF«STATE»= "AK" "Text for AK"}
    {IF«STATE»= "WA" "Text for WA"}
    etc.

    Note: The field brace pairs (i.e. '{ }') for the above examples are created in the document itself, via Ctrl-F9 (Cmd-F9 on a Mac); you can't simply type them or copy & paste them from this message. Nor is it practicable to add them via any of the standard Word dialogues. Likewise, you can't type or copy & paste the chevrons (i.e. '« »') - they're part of the actual mergefields, which you can insert from the mailmerge toolbar.
    Cheers,

    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
  •