Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-20-2025, 06:51 AM
janetyjanet janetyjanet is offline Blank Line Removal in Nested IF Windows 11 Blank Line Removal in Nested IF Office 2021
Novice
Blank Line Removal in Nested IF
 
Join Date: Mar 2025
Posts: 3
janetyjanet is on a distinguished road
Default Blank Line Removal in Nested IF

Hi - looking for some advice to prevent baldness as I'm tearing my hair out with this issue!
I've got a complex mail merge with nested IFs but have simplified below to provide an example as I can't work out where to put the /b "" & the paragraph marker from the line above

text text text
{ if {MERGEFIELD BONUS_SCHEME } = "Regional" "{ MERGEFIELD Regionname }% Region" }
text text text

If the BONUS_SCHEME merge field doesn't contain 'Regional" then this is what I see

text text text

text text text



so I want to remove the blank line - but for the life of me I can't work out where to put the switch - can anyone help please?!
Reply With Quote
  #2  
Old 03-20-2025, 03:35 PM
macropod's Avatar
macropod macropod is offline Blank Line Removal in Nested IF Windows 10 Blank Line Removal in Nested IF Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,369
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Simple:
text text text{IF{MERGEFIELD BONUS_SCHEME}= "Regional" "¶
{MERGEFIELD Regionname}% Region"}¶
text text text¶

where the ¶ characters represent real paragraph/line breaks.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 03-21-2025, 01:33 AM
janetyjanet janetyjanet is offline Blank Line Removal in Nested IF Windows 11 Blank Line Removal in Nested IF Office 2021
Novice
Blank Line Removal in Nested IF
 
Join Date: Mar 2025
Posts: 3
janetyjanet is on a distinguished road
Default

blummin' brilliant - thank you so much - and no need to use /b etc which is what I'd been trying to do based on lots of online posts.
Genius!!
Reply With Quote
  #4  
Old 03-21-2025, 02:21 AM
macropod's Avatar
macropod macropod is offline Blank Line Removal in Nested IF Windows 10 Blank Line Removal in Nested IF Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,369
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

The \b and \f switches are only useful for controlling whether to output something dependent in whether the parent field - in this case BONUS_SCHEME has data; they can't be used to differentiate data. See the Mailmerge Empty Line Suppression topic in the Mailmerge Tips & Tricks 'Sticky' thread at the top of this forum: https://www.msofficeforums.com/mail-...ps-tricks.html
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 03-21-2025, 03:29 AM
janetyjanet janetyjanet is offline Blank Line Removal in Nested IF Windows 11 Blank Line Removal in Nested IF Office 2021
Novice
Blank Line Removal in Nested IF
 
Join Date: Mar 2025
Posts: 3
janetyjanet is on a distinguished road
Default

yes, I can see now that makes absolute sense - and what a treasure trove of knowledge in the tips & tricks thread, wow!
thanks for your help, it's much appreciated
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Blank Line Removal in Nested IF How can I delete a blank line with Word VBA if it is followed by another blank line? jamu Word VBA 9 04-11-2022 04:21 PM
Blank Line Removal in Nested IF Making mail merge blank fill a line to highlight that line rgm60527 Mail Merge 2 02-22-2022 11:13 AM
Opening Blank Doc while Off-Line MurrayL Word 1 08-25-2019 01:32 AM
Opening Blank Doc while Off-line MurrayL Word 1 08-24-2019 11:31 PM
syntax for inserting blank line before inserting table and after a line or paragraph SamDsouza Word VBA 8 08-04-2019 11:10 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:07 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft