Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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,

MS EXCEL

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

MS Word Merged Email

Record1 Hi, blah blah blah

         <<Column9>>
         <<Column10>>

Record2 Hi, blah blah blah

Record 3 Hi, blah blah blah

         <<Column8>>
         <<Column9>>
         <<Column10>>

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

1 Answer 1

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.): http://office.microsoft.com/en-us/word-help/field-codes-mergefield-field-HP005186172.aspx

Either method does the same thing.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.