View Single Post
 
Old 05-15-2022, 08:54 AM
Ozzyy Ozzyy is offline Windows 10 Office 2019
Novice
 
Join Date: May 2021
Posts: 4
Ozzyy is on a distinguished road
Default 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:
  • for Word to show a series of fields (each on a new row) if the condition is met, and
  • for Word to not show any blank spaces if this condition is not met

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!!
Reply With Quote