Getting rid of blank lines in a merged document

M

Michelle

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!
 
P

Peter Jamieson

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 }
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top