0
I am mail-merging a letter and ran into a problem with how numbered lists and if/then/else conditionals interact. Can any Microsoft Word experts help me out? :-)
Imagine a numbered list like so:
1. You are awesome
2. You are not awesome
3. This is something else
Now, imagine that the items that appear next to #1-2 are mutually exclusive. Thus, there are two desired possible results after a mail merge:
DESIRED OUTPUT FOR AWESOME CASE
1. You are awesome
2. This is something else
OR
DESIRED OUTPUT FOR NOT AWESOME CASE
1. You are not awesome
2. This is something else
The actual output is like so:
ACTUAL OUTPUT FOR AWESOME CASE
1. You are awesome
2.
3. This is something else
ACTUAL OUTPUT FOR UNAWESOME CASE
1.
2. You are not awesome
3. This is something else
Here is the code that I'm using:
{ IF {MERGEFIELD IS_AWESOME} = "x" "You are awesome"} }
{ IF {MERGEFIELD IS_NOT_AWESOME} = "x" "You are not awesome"} }
These lines have a "numbered list" format applied to it. (I know of no way of making a line item appear as a numbered list without using the standard "numbered list" button.)
I can conceive of a workaround in which I use nested if statements to suppress empty lines, by merging all the conditions of numbered items 1-3. But my actual example has 12 lines, and the number of if-then statements would be exponentially large.
Is there a direct way of making Microsoft Word generate my desired output?
Thanks!
Thanks, this is great. Your insight of putting all the IF MERGEFIELDs on one line is genius. :-)
Note for others: if your bullets/numbered-items has multiple lines (requiring a carriage-return of sorts), you can use a shift-enter to prevent Word from adding bullets/numbers to the subsequent lines. – bobbyh – 2016-05-18T04:10:03.067