Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Word > Mail Merge

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 02-01-2017, 02:37 PM
jmunro10 jmunro10 is offline Windows XP Office 2016
Novice
 
Join Date: Feb 2017
Posts: 3
jmunro10 is on a distinguished road
Default if/then/else and blanks


this is what i have. how do i avoid blank lines here? I have 40 if the else lines.

Code:
{if {mergefield colum1} = "1" "UGRD Bank Statement" ""}
{if {mergefield colum2} = "1" "I20 Form" ""}
{if {mergefield colum3} = "1" "GR Bank Statement for I20" ""}
{if {mergefield colum4} = "1" "Graduate English Language Test" ""}


Result:
UGRD Bank Statement

GR Bank Statement for I20
Graduate English Language Test


Desired Result:
UGRD Bank Statement
GR Bank Statement for I20
Graduate English Language Test
Reply With Quote
  #2  
Old 02-02-2017, 01:57 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,199
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

See Mailmerge Empty Line Suppression in the Mailmerge Tips and Tricks 'Sticky' thread at the top of this forum:
http://www.msofficeforums.com/mail-m...ps-tricks.html
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #3  
Old 02-03-2017, 10:20 AM
jmunro10 jmunro10 is offline Windows XP Office 2016
Novice
 
Join Date: Feb 2017
Posts: 3
jmunro10 is on a distinguished road
Default follow up

thank you. a few follow up questions:

1. can you explain #3 a bit more - how to move a paragraph break into field code?

2. where do i put the \b in a if/then/else notation?
{if {mergefield colum4} = "1" "Graduate English Language Test" ""}

JM
Reply With Quote
  #4  
Old 02-03-2017, 01:54 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,199
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

Quote:
Originally Posted by jmunro10 View Post
1. can you explain #3 a bit more - how to move a paragraph break into field code?
You could drag it, cut & paste it, etc. Whichever you prefer. You could even build the IF field around it or create a new one within the field code and delete the one following it, but neither of those approaches is described in the instructions.
Quote:
Originally Posted by jmunro10 View Post
2. where do i put the \b in a if/then/else notation?
{if {mergefield colum4} = "1" "Graduate English Language Test" ""}
You don't - the \b and \f switches are alternative means of displaying conditional content with the mergefield.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #5  
Old 02-06-2017, 08:37 AM
jmunro10 jmunro10 is offline Windows XP Office 2016
Novice
 
Join Date: Feb 2017
Posts: 3
jmunro10 is on a distinguished road
Default

ok - so i'm back to where i started. how do i suppress the blank lines with the if/then/else notation:

{if {mergefield colum4} = "1" "Graduate English Language Test" ""}
Reply With Quote
  #6  
Old 02-06-2017, 05:03 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,199
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

You do it via the method described in the link I gave you...
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
Reply

Tags
merge fields

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to refer to a variable with BLANKs Officer_Bierschnitt Excel Programming 13 11-05-2015 07:40 AM
CountA function to Count Blanks Alaska1 Excel 10 02-11-2015 04:20 PM
Counting Blanks in 1 Column and Non-Blanks in Another dogwood705 Excel 4 02-07-2015 08:45 AM
how to replace a full paragraph with blanks? dylansmith Word 8 10-22-2012 11:51 PM
fill blanks in box keevitaja Word 1 05-23-2011 06:34 PM


All times are GMT -7. The time now is 11:36 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
MSOfficeForums.com is not affiliated with Microsoft