Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running an mail merge program, where I need to merge certain fields. I have done these in the past. Just to add on these, I have to print certain text based on the value of the field in MS Excel. For Example,


               <<Column8>> <<Column9>> <<Column10>>
   Record1          Y           N           Y
   Record2          N           N           N
   Record3          Y           Y           Y

MS Word Merged Email

Record1 Hi, blah blah blah


Record2 Hi, blah blah blah

Record 3 Hi, blah blah blah


But when I use and IF_THEN_ELSE, it gives me an blank space.Please advise. Thanks.

share|improve this question
Could you post a screenshot if you are still having this issue? – Adam Mar 20 '13 at 4:10

Take the space out of your document and put it inside the mail merge code (press Alt-F9 to see)

For instance: I am riding a{IF {MERGEFIELD Is_Mini} = "True" " miniature" ""} bus today. (notice the space before "miniature").

The same principle applies to to line breaks.

You can also use \b and \f for text before and after (e.g., I am riding a{IF {MERGEFIELD Is_Mini} = "True" "miniature" "" \b " "} bus today.):

Either method does the same thing.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .