Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Jul 2016
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    MSWord 2010 MailMerge with nested IF's

    Trying to mailmerge a document where it would have 1 or 2 signatories depending on the company, and since North Americans doesn't want the signatures dated in this instance, I want to make the field display "Date:" if the signatory field above it is not blank AND Regions is not "North America".

    I can get each condition to work on its own but I must be doing something wrong when I combine it.....tried a few variations after doing some research but nothing worked. Here are couple of the options I've attempted:

    { IF {MERGEFIELD REGION} <> "North America" "Date:" "" { IF {MERGEFIELD SIGNATORY 1} <> "" "Date:" "" } }

    { IF {MERGEFIELD REGION} = "North America" "" "Date:" "{ IF {MERGEFIELD SIGNATORY 1} <> "" "Date:" "" }" }


    Here's some fake data I used to test:

    Company Signatory 1 Signatory 2 Region
    Company A John Smith Jane Smith North America
    Company B John Smith Asia Pacific
    Company C John Smith Jane Smith Asia Pacific
    Company D John Smith North America



    Any ideas?


    Thanks in advance!
    Last edited by Jakali; 2016-07-25 at 19:26.

  2. #2
    New Lounger
    Join Date
    Jul 2016
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Just used this:
    { IF { MERGEFIELD Signatory2 } <> "" { IF { MERGEFIELD Region } <> "North America" "Date" "" } }

    The results are a bit weird.......

    If it's North America with a signatory then this shows up: {
    If it's North America without a signatory then this shows up: IF
    If it's Asia Pacific with a signatory then this shows up: {
    If it's Asia Pacific without a signatory then this shows up: IF

    Also tried:
    { IF { MERGEFIELD Signatory2 } = "" "" { IF { MERGEFIELD Region } <> "North America" "Date" "" } }

    The results are more promising as it blanks out when there's no signatory:

    If it's North America with a signatory then this shows up: {
    If it's North America without a signatory then it's blank
    If it's Asia Pacific with a signatory then this shows up: {
    If it's Asia Pacific without a signatory then it's blank

  3. #3
    Star Lounger Graham Mayor's Avatar
    Join Date
    Mar 2016
    Location
    Cyprus
    Posts
    68
    Thanks
    0
    Thanked 24 Times in 24 Posts
    Did you use CTRL+F9 for each bracket pair {} ?
    Graham Mayor - Word MVP
    http://www.gmayor.com

  4. #4
    Lounger
    Join Date
    May 2003
    Posts
    29
    Thanks
    3
    Thanked 1 Time in 1 Post
    because nests can be a pain, I tend to build them using the insert field option in word, and then putting @@@ in as the text for the first, and ### as the second (so easy to spot random stuff). You can then amend these random texts into further IF fields by repeating the process.

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
  •