(Msg. 1) Posted: Wed Sep 16, 2009 4:11 pm
Post subject: How do I avoid a blank line if a mail merge field is empty? Archived from groups: microsoft>public>word>mailmerge>fields (more info?)
Some addresses need only one line before the city and state, that is, they
only need an Address 1 field. Other addresses require two or even three
lines so I have had to create an Address 2 and an Address 3 field.
Unfortunately, this means that when an address that has no data in Address 2
or Address 3 prints, the program leaves two blank lines between the Address 1
line and the City/State line. Is there anyway to avoid the blanks lines so
that the City/State line will appear directly under the Address 1 line if
there is no data in Address 2 and 3?
(Msg. 2) Posted: Thu Sep 17, 2009 3:05 am
Post subject: Re: How do I avoid a blank line if a mail merge field is empty? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
Hi Geo 4,
In Word:
.. duplicate the mailmerge field for the line to be suppressed when there are no data (eg «MyData») so that you get «MyData»«MyData»;
.. select both fields and Press Ctrl-F9 to enclose them in a new field, thus { «MyData»«MyData» };
.. fill in between the braces so that you end up with {IF«myData»= "" "" "«MyData»¶
"}, where the '¶' is a paragraph mark or line-feed, depending on which you're using;
.. delete the existing paragraph mark or line-feed after the field;
.. position the cursor anywhere in this field and press F9 to update it;
.. run your mailmerge.
--
Cheers
macropod
[Microsoft MVP - Word]
"Geo 4" <Geo 4 RemoveThis @discussions.microsoft.com> wrote in message news:A9CE385A-58E3-47E7-813E-4B4B2B680B60@microsoft.com...
> Some addresses need only one line before the city and state, that is, they
> only need an Address 1 field. Other addresses require two or even three
> lines so I have had to create an Address 2 and an Address 3 field.
> Unfortunately, this means that when an address that has no data in Address 2
> or Address 3 prints, the program leaves two blank lines between the Address 1
> line and the City/State line. Is there anyway to avoid the blanks lines so
> that the City/State line will appear directly under the Address 1 line if
> there is no data in Address 2 and 3?
(Msg. 3) Posted: Fri Sep 18, 2009 1:44 pm
Post subject: Re: How do I avoid a blank line if a mail merge field is empty? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
Thanks macropod. Your solution worked well.
Geo 4
"macropod" wrote:
> Hi Geo 4,
>
> In Word:
> .. duplicate the mailmerge field for the line to be suppressed when there are no data (eg «MyData») so that you get «MyData»«MyData»;
> .. select both fields and Press Ctrl-F9 to enclose them in a new field, thus { «MyData»«MyData» };
> .. fill in between the braces so that you end up with {IF«myData»= "" "" "«MyData»¶
> "}, where the '¶' is a paragraph mark or line-feed, depending on which you're using;
> .. delete the existing paragraph mark or line-feed after the field;
> .. position the cursor anywhere in this field and press F9 to update it;
> .. run your mailmerge.
>
> --
> Cheers
> macropod
> [Microsoft MVP - Word]
>
>
> "Geo 4" <Geo 4.DeleteThis@discussions.microsoft.com> wrote in message news:A9CE385A-58E3-47E7-813E-4B4B2B680B60@microsoft.com...
> > Some addresses need only one line before the city and state, that is, they
> > only need an Address 1 field. Other addresses require two or even three
> > lines so I have had to create an Address 2 and an Address 3 field.
> > Unfortunately, this means that when an address that has no data in Address 2
> > or Address 3 prints, the program leaves two blank lines between the Address 1
> > line and the City/State line. Is there anyway to avoid the blanks lines so
> > that the City/State line will appear directly under the Address 1 line if
> > there is no data in Address 2 and 3?
>
>
All times are: Eastern Time (US & Canada) (change)
Page 1 of 1
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum