Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / October 2003

Tip: Looking for answers? Try searching our database.

Getting rid of blank lines in a merged document

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michelle - 07 Oct 2003 18:15 GMT
I have several letters set up with merge fields.   The
letter will sometimes go to an individual or an individual
and another person.  How can I get it to include the 2nd
individual if it is in the data source and NOT include
that blank line if there is not another individual.

For example:

Person 1
Person 2 (if in the data source)
Address
City, State Zip

I don't want a blank line if there is NOT a Person 2.

Thanks for the help!
Peter Jamieson - 08 Oct 2003 07:59 GMT
As long as "Person 2" is a completely blank field (no spaces) if there is no
person 2, you should be able to use

{ MERGEFIELD "Person 1" }
{ MERGEFIELD "Person 2" }
{ MERGEFIELD Address }
{ MERGEFIELD City }, { MERGEFIELD State } { MERGEFIELD Zip }

The "suppress blank fields" option (which is switched /on/ by default)
should do the rest for you. If you are using Word 2000 or earlier, you can
ensure it is on using the Merge Options button in MailMergeHelper. However,
if the field is not completely blank, it will not be suppressed.

Also, if you are using Word 2002 or later,
a. you need to be using individual fields, as above, not the ADDRESSBLOCK
field
b. to use the (old) MailMergeHelper dialog box, you have to locate it in
Tools|Customize|Comands|All Commands and drag it to a menu or toolbar
c. if the mergefields are nested inside another field, suppression of blank
lines does not work.

If blank line suppression is not working, you have to do the suppression
manually using IF fields. In this case, try

{ MERGEFIELD "Person 1"
}{ IF "{ MERGEFIELD "Person 2" }" = "<put as many blanks as are actually in
a blank Person 2 here>"
"" "<put a paragraph mark here>{ MERGEFIELD "Person 2" }" }
{ MERGEFIELD Address }
{ MERGEFIELD City }, { MERGEFIELD State } { MERGEFIELD Zip }
--
Peter Jamieson
MS Word MVP

> I have several letters set up with merge fields.   The
> letter will sometimes go to an individual or an individual
[quoted text clipped - 12 lines]
>
> Thanks for the help!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.