|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Removing Blank Conditional Sections in Mail Merge if Condition is not Met
Hello –
I have an Excel to Word mail merge set up with some conditional sections. I’ve got the conditions all working well, but am struggling with having Word skip over blank rows if the condition is not met. My goals are:
Here is a simplified example of the logic I’m working with: STATIC TEXT HERE { if {MERGEFIELD Bonus Amount} = 0 “” {MERGEFIELD Annual Salary}} { if {MERGEFIELD Bonus Amount} = 0 “” {MERGEFIELD Bonus Rate}} { if {MERGEFIELD Bonus Amount} = 0 “” {MERGEFIELD Bonus Amount}} MORE STATIC TEXT HERE Sample desired output if condition is met: STATIC TEXT HERE 60,000 10% 6,000 MORE STATIC TEXT HERE Sample desired output if condition is not met: STATIC TEXT HERE MORE STATIC TEXT HERE Current output if condition is met (this is working as I want): STATIC TEXT HERE 60,000 10% 6,000 MORE STATIC TEXT HERE Current output if condition is not met (I can’t figure out how to remove the blank rows): STATIC TEXT HERE MORE STATIC TEXT HERE --- Any assistance on how to remove those blank rows when the condition is not met would be greatly appreciated. Thanks!! |
#2
|
||||
|
||||
That's as simple as:
{IF{MERGEFIELD Bonus Amount}<> 0 "{MERGEFIELD Annual Salary}¶ {MERGEFIELD Bonus Rate}¶ {MERGEFIELD Bonus Amount}"} where the ¶ is a paragraph break or manual line break.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
That worked - thank you! I'd forgotten that multiple merge fields can be included within quotation marks - that seemed to be key to resolving this issue.
Really appreciate your help! |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Suppressing Blank Conditional Sections in Mail Merge | Ozzyy | Mail Merge | 3 | 05-08-2021 04:31 PM |
Conditional Text without Mail Merge | wvdh | Word | 3 | 10-05-2017 02:38 AM |
Mail merge in sections with address list | patrickpetersen | Mail Merge | 1 | 02-18-2015 10:57 PM |
Mail Merge - Filters adding condition not originally specified | bobcharest | Mail Merge | 11 | 06-13-2014 11:03 PM |
Conditional merge fields in mail merge | Aude | Mail Merge | 1 | 01-06-2012 07:38 PM |