Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-06-2022, 04:52 PM
BernieB BernieB is offline Suppress blank line in mail merge Windows 10 Suppress blank line in mail merge Office 2016
Novice
Suppress blank line in mail merge
 
Join Date: Mar 2022
Posts: 4
BernieB is on a distinguished road
Default Remove blank line from Directory MailMerge

Thank you Paul!

Yes this worked great and easier than IF statements.



My code now looks like this:
{QUOTE{IF{MERGESEQ}= 1 {SET Key ""}}"{IF{MERGEFIELD Organization}
<> {REF Key \* MERGEFORMAT } "{IF{MERGESEQ}> 1 ""}{ QUOTE 12 }
{MERGEFIELD Organization \* MERGEFORMAT }

{ MERGEFIELD Name \* MERGEFORMAT }{SET Key {MERGEFIELD Organization }}"
{ MERGEFIELD Name }}
{ MERGEFIELD Title \f"
"}{ MERGEFIELD Organization2 \f"
"}{ MERGEFIELD Address_1 \f"
"}{ MERGEFIELD Address_2 \f"
"}{ MERGEFIELD City }, { MERGEFIELD Province }
{ MERGEFIELD Postal_Code }}


Another question: Is there a way to put the comma between City and Province somewhere else in case there is no City or Province?

Thank you,
Bernie
Reply With Quote
  #2  
Old 03-06-2022, 05:49 PM
macropod's Avatar
macropod macropod is offline Suppress blank line in mail merge Windows 10 Suppress blank line in mail merge Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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

Quote:
Originally Posted by BernieB View Post
Another question: Is there a way to put the comma between City and Province somewhere else in case there is no City or Province?
You could conditionally insert the comma and its space into the Province output using the \b switch. See the Mailmerge Empty Space Suppression topic in the Mailmerge Tips & Tricks thread.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 03-07-2022, 02:17 PM
BernieB BernieB is offline Suppress blank line in mail merge Windows 10 Suppress blank line in mail merge Office 2016
Novice
Suppress blank line in mail merge
 
Join Date: Mar 2022
Posts: 4
BernieB is on a distinguished road
Default

Yes, that is perfect!

{QUOTE{IF{MERGESEQ}= 1 {SET Key ""}}"{IF{MERGEFIELD Organization}
<> {REF Key \* MERGEFORMAT } "{IF{MERGESEQ}> 1 ""}{ QUOTE 12 }
{MERGEFIELD Organization \* MERGEFORMAT }

{ MERGEFIELD Name \* MERGEFORMAT }{SET Key {MERGEFIELD Organization }}"
{ MERGEFIELD Name }}
{ MERGEFIELD Title \f"
"}{ MERGEFIELD Organization2 \f"
"}{ MERGEFIELD Address_1 \f"
"}{ MERGEFIELD Address_2 \f"
"}{ MERGEFIELD City }{ MERGEFIELD Province \b ", "}
{ MERGEFIELD Postal_Code }}

Thanks again,
Bernie
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Suppress blank line in mail merge Making mail merge blank fill a line to highlight that line rgm60527 Mail Merge 2 02-22-2022 11:13 AM
Suppress blank line in mail merge Suppress paragraph mark in mail merge field acerview Mail Merge 3 12-22-2015 07:44 PM
Suppress blank line in mail merge Suppress comma in "city , stat zip" line when blank DHammer Mail Merge 1 05-30-2014 02:43 AM
Suppress blank line in mail merge Suppress blanks in mail merge 0nyx175 Mail Merge 11 01-07-2014 02:45 PM
Suppress blank line in mail merge Easy mail merge but want to suppress rows ClaireAMAdams Mail Merge 5 04-30-2013 02:43 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:04 AM.


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