Group:  Microsoft Word ยป microsoft.public.word.mailmerge.fields
Thread: Shrink blank fields in mail merge

Geek News

Shrink blank fields in mail merge
Deejay 6/13/2007 7:21:02 PM
How do I shrink blank lines in a mail merge. Typically one contact may have a
2 line address and another has a 3 line address. How do I ensure that the 2
line address contact doesn't have a blank line before the town/city line? I
know it can be done in Access but can it be done in Word?

Thanks.
Re: Shrink blank fields in mail merge
"Graham Mayor" <gmayor[ at ]REMOVETHISmvps.org> 6/14/2007 6:02:36 AM
The simplest way which works under all circumstances is to use a series of
conditional fields to insert the line feeds and the mergefields only when
there is data in them eg

{Mergefield fieldname1}{IF {Mergefield fieldname2} <> "" "
{Mergefield fieldname2} "}{IF {Mergefield fieldname3} <> "" "
{Mergefield fieldname3} "}{IF {Mergefield fieldname4} <> "" "
{Mergefield fieldname4} "}

Change the fieldnames as appropriate to your data. All the bracket pairs {}
are inserted with CTRL+F9 and the only line feeds and spaces are placed
where shown.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

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


Deejay wrote:
[Quoted Text]
> How do I shrink blank lines in a mail merge. Typically one contact
> may have a 2 line address and another has a 3 line address. How do I
> ensure that the 2 line address contact doesn't have a blank line
> before the town/city line? I know it can be done in Access but can it
> be done in Word?
>
> Thanks.


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net