+ Reply to Thread
Results 1 to 2 of 2

Thread: MailMerge and IF statement

  1. #1
    Valued Forum Contributor
    Join Date
    02-26-2010
    Location
    Michiagn
    MS-Off Ver
    Excel 2003/2007
    Posts
    350

    Talking MailMerge and IF statement

    Hello!


    I can't figure out how do do the syntax for this. If the Status field value is "Item on Hold", color the text red. If Accepted Item, blue, and anything else, yellow.

    I can do the font color part, but it is the IF, quotes, brackets, = Text part that is stumping me. Here's what I have so far:

    IF{MERGEFIELD "Status"} = ITEM ON HOLD" {MERGEFIELD "Status"}" "{IF {MERGEFIELD "Status"} = ACCEPTED ITEM "{MERGEFIELD "Status"}" "{MERGEFIELD "Status"}"}"

    I appreciate the help!

    Respectfully,

    Lost
    Last edited by leaning; 08-10-2011 at 12:25 PM. Reason: Solved!

  2. #2
    Valued Forum Contributor
    Join Date
    02-26-2010
    Location
    Michiagn
    MS-Off Ver
    Excel 2003/2007
    Posts
    350

    Talking Re: MailMerge and IF statement

    All,

    I figured out what I was doing wrong.

    Here's the info from this site: http://word.mvps.org/faqs/mailmerge/mmergeiffields.htm.

    Where the curly brackets represent field braces, which you must insert by pressing Ctrl+F9 (you can't type them). A real example might be:
    { IF { MERGEFIELD Gender } = "Male" "Him" "Her" }
    Again, all of the curly brackets must be inserted by pressing Ctrl+F9.
    I was justing typing in the curly brackets, so Word didn't know that was supposed to be a MergeField rather than text.

    Ctrl+F9 puts in the curly brackets, then you just cut-and-paste between them.

    Good stuff!

    Respectfully,

    Lost

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.2.0