Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-30-2022, 11:30 AM
caroleemoreno caroleemoreno is offline Suppress blank lines with IF THEN ELSE Windows 10 Suppress blank lines with IF THEN ELSE Office 2019
Novice
Suppress blank lines with IF THEN ELSE
 
Join Date: Jun 2022
Posts: 5
caroleemoreno is on a distinguished road
Default Suppress blank lines with IF THEN ELSE

Hello. I have the following if then statement with a mail merge and I can not figure out how to suppress the blank lines when the result is empty in the merge file. I have tried \b and entering ¶, but I still get blank spaces when the result is empty . I have also tried other solutions on this forum and nothing works. Can someone help? Here are two of the 20 lines. If the value is empty, I want it to suppress the blank lines .

{IF{MERGEFIELD Bulletin Board }= "" "Furniture First Bulletin Board" ""}
{IF {MERGEFIELD Man_Wah_Central_Bill}= "" "Man Wah Cheers Container Buys" ""}

Thanks in advance!
Reply With Quote
  #2  
Old 06-30-2022, 09:22 PM
macropod's Avatar
macropod macropod is offline Suppress blank lines with IF THEN ELSE Windows 10 Suppress blank lines with IF THEN ELSE Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

Did you read the Mailmerge Tips & Tricks thread at the top of this forum? Your issue is addressed there.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 07-01-2022, 04:24 AM
caroleemoreno caroleemoreno is offline Suppress blank lines with IF THEN ELSE Windows 10 Suppress blank lines with IF THEN ELSE Office 2019
Novice
Suppress blank lines with IF THEN ELSE
 
Join Date: Jun 2022
Posts: 5
caroleemoreno is on a distinguished road
Default

Yes, I did read them and tried both options, but neither one works. i was hoping someone would be kind enough to just modify my string with the correction switch and tell me what I am doing wrong.
Reply With Quote
  #4  
Old 07-01-2022, 05:56 PM
macropod's Avatar
macropod macropod is offline Suppress blank lines with IF THEN ELSE Windows 10 Suppress blank lines with IF THEN ELSE Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

Really? It's no more complicated than:
{IF{MERGEFIELD Bulletin Board }= "" "Furniture First Bulletin Board"}{IF{MERGEFIELD Man_Wah_Central_Bill}= "" "¶
Man Wah Cheers Container Buys"}
where the ¶ is a real paragraph/line break.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 07-05-2022, 05:24 AM
caroleemoreno caroleemoreno is offline Suppress blank lines with IF THEN ELSE Windows 10 Suppress blank lines with IF THEN ELSE Office 2019
Novice
Suppress blank lines with IF THEN ELSE
 
Join Date: Jun 2022
Posts: 5
caroleemoreno is on a distinguished road
Default

No, maybe I was not clear. What I am trying to get it to do is if the mergefield is blank, then list the text, but if the mergefield is not blank, I just want it to skip the record completely and not show and blank space.

So, if MERGEFIELD is not blank then "list text" if MERGEFIELD is not blank then skip record and go to the next one.
Reply With Quote
  #6  
Old 07-06-2022, 07:20 AM
macropod's Avatar
macropod macropod is offline Suppress blank lines with IF THEN ELSE Windows 10 Suppress blank lines with IF THEN ELSE Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

So did you actually try it? The field code representation I posted does exactly what you have described...
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #7  
Old 07-06-2022, 07:23 AM
caroleemoreno caroleemoreno is offline Suppress blank lines with IF THEN ELSE Windows 10 Suppress blank lines with IF THEN ELSE Office 2019
Novice
Suppress blank lines with IF THEN ELSE
 
Join Date: Jun 2022
Posts: 5
caroleemoreno is on a distinguished road
Default

Yes, I did try it. Blank lines are still there.
Reply With Quote
  #8  
Old 07-06-2022, 07:42 AM
caroleemoreno caroleemoreno is offline Suppress blank lines with IF THEN ELSE Windows 10 Suppress blank lines with IF THEN ELSE Office 2019
Novice
Suppress blank lines with IF THEN ELSE
 
Join Date: Jun 2022
Posts: 5
caroleemoreno is on a distinguished road
Default

Hey! I got it! Thank you so so so much! You are a God!
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Suppress blank lines with IF THEN ELSE Suppress blank line in mail merge BernieB Mail Merge 8 03-07-2022 02:17 PM
Suppress blank lines with IF THEN ELSE Suppress blank lines Khalil Mail Merge 4 09-13-2020 10:41 PM
Suppress blank lines with IF THEN ELSE Suppress blank lines in mailmerge of excel reports into word document beefcake2000 Mail Merge 1 11-10-2017 12:54 PM
Suppress Header/Footer on Blank Pages in Book SQLUSA Word 5 08-19-2012 03:51 PM
Suppress blank lines with IF THEN ELSE How to turn all blank lines into non-blank for legal forms sieler Word 3 04-12-2009 01:38 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:12 PM.


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