Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-12-2020, 03:36 PM
Khalil Khalil is offline Suppress blank lines Windows 10 Suppress blank lines Office 2010
Novice
Suppress blank lines
 
Join Date: Sep 2020
Location: Melbourne
Posts: 3
Khalil is on a distinguished road
Default Suppress blank lines


Hi,
I have a mail merge directory where let's say a specific field is sometimes blank and sometimes not blank. I am also using the "If ... then" condition. After completing the merge, if the field is empty or blank the merge will display a blank line. I've been trying for days to find a solution to hide the blank line but failed. I've found a lot of solutions on the web such as using the switch \b and \f, which I found useless may be because I don't understand the way they work. However, I can hide the blank line using any suggested technique but my big problem is when the field is not empty the following field will appear on the same line with the previous one, and this is not what I want. I wish to hide the blank line when the field is not empty without affecting the appearance of the merge when the field is not empty. In other words, I want each field on a separate line. I understand the blank line is suppressed by default but not when using "IF". This is very disappointing and would appreciate a clear well explained solution.
Thank you
Reply With Quote
  #2  
Old 09-12-2020, 10:23 PM
gmayor's Avatar
gmayor gmayor is offline Suppress blank lines Windows 10 Suppress blank lines Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

What is your "If ... then" condition ?
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 09-13-2020, 02:29 PM
Khalil Khalil is offline Suppress blank lines Windows 10 Suppress blank lines Office 2010
Novice
Suppress blank lines
 
Join Date: Sep 2020
Location: Melbourne
Posts: 3
Khalil is on a distinguished road
Default

I have a directory where I wish to keep two records in one page.
To keep the second record in the same page I used "If... then:"
Code:
{IF { MERGEFIELD } ADDRESSE2} = <> "" { MERGEFIELD} ADDRESEE2 } ""}
When the field is blank, I shall have a blank line that I want to get rid of, and when I remove the line, in the following records, if the field is not blank I shall have the following on the same line:
<<Addresee2>> <<Suburb>>
I want to keep the <<Suburb>> in a separate line, which is impossible for me to fix.
Reply With Quote
  #4  
Old 09-13-2020, 09:08 PM
gmayor's Avatar
gmayor gmayor is offline Suppress blank lines Windows 10 Suppress blank lines Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

What you should have is


{ MERGEFIELD ADDRESEE1 } {IF { MERGEFIELD ADDRESEE2 } <> "" "¶
{ MERGEFIELD ADDRESEE2 }" }¶
{ MERGEFIELD SUBURB }¶


The ¶ symbols indicate where you need to press the Enter key to create a paragraph break. Use CTRL+F9 to insert the brackets { }
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com

Last edited by gmayor; 09-14-2020 at 04:07 AM.
Reply With Quote
  #5  
Old 09-13-2020, 10:41 PM
Khalil Khalil is offline Suppress blank lines Windows 10 Suppress blank lines Office 2010
Novice
Suppress blank lines
 
Join Date: Sep 2020
Location: Melbourne
Posts: 3
Khalil is on a distinguished road
Default

It is working. Thank You very much for your help.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Suppress blank lines Suppress blank lines in mailmerge of excel reports into word document beefcake2000 Mail Merge 1 11-10-2017 12:54 PM
Suppress blank lines Suppress comma in "city , stat zip" line when blank DHammer Mail Merge 1 05-30-2014 02:43 AM
Suppress Header/Footer on Blank Pages in Book SQLUSA Word 5 08-19-2012 03:51 PM
Suppress blank lines Getting blank lines instead of supressed lines. Welshie82 Mail Merge 2 11-14-2011 01:41 AM
Suppress blank lines 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 06:03 AM.


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