![]() |
|
![]() |
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
![]()
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! |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Ozzyy | Mail Merge | 3 | 05-08-2021 04:31 PM |
![]() |
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 |
![]() |
Aude | Mail Merge | 1 | 01-06-2012 07:38 PM |