Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-01-2017, 02:37 PM
jmunro10 jmunro10 is offline if/then/else and blanks Windows XP if/then/else and blanks Office 2016
Novice
if/then/else and blanks
 
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 if/then/else and blanks Windows 7 64bit if/then/else and blanks Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

See Mailmerge Empty Line Suppression in the Mailmerge Tips and 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
  #3  
Old 02-03-2017, 10:20 AM
jmunro10 jmunro10 is offline if/then/else and blanks Windows XP if/then/else and blanks Office 2016
Novice
if/then/else and blanks
 
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 if/then/else and blanks Windows 7 64bit if/then/else and blanks Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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 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
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 02-06-2017, 08:37 AM
jmunro10 jmunro10 is offline if/then/else and blanks Windows XP if/then/else and blanks Office 2016
Novice
if/then/else and blanks
 
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 if/then/else and blanks Windows 7 64bit if/then/else and blanks Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

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

Tags
merge fields



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
if/then/else and blanks CountA function to Count Blanks Alaska1 Excel 10 02-11-2015 04:20 PM
if/then/else and blanks Counting Blanks in 1 Column and Non-Blanks in Another dogwood705 Excel 4 02-07-2015 08:45 AM
if/then/else and blanks how to replace a full paragraph with blanks? dylansmith Word 8 10-22-2012 11:51 PM
if/then/else and blanks fill blanks in box keevitaja Word 1 05-23-2011 06:34 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:30 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