View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default If the mergefield is blank, delete the line.

You don't delete the line, but insert it only when it has content. Thus you
need to conditionally insert the field eg

{Mergefield Name}
{Mergefield Address1}{If{Mergefield Address2} "" "
{Mergefield Address2}"}
{Mergefield City} etc

You can use the same method for as many fields as may be empty.

Also if you use the old mailmerge helper -
http://www.gmayor.com/mail_merge_lab...th_word_xp.htm you should have
the option to suppress blank lines in addresses - but the former method is
simpler and more reliable.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




wrote:
I would like to print addresses. All of the addresses do not have
the same number of lines.

Name
Address 1
Address 2
City, State, Zip

Name
Address 1
City, State Zip

When Address 2 = N.A., I would like the merge to delete the line so
the address looks like the second example.
Many thanks.