how to remove empty lines from a label mail merge

S

Suzanne

i have created a label mail merge using data from an address list (excel) not
all of the fields used have details ie address 2 is blank in some cases -
however i am unable to make the address lines shuffle up so there are no
blank lines on my lables
can anyone assist?
 
D

Doug Robbins - Word MVP

You need to use an If...then...Else field construction that checks for the
existence of data in Address 2. If there is none, it inserts the
mergefields that otherwise be on the next line; If there is data, it
inserts the Address 2 data and then inserts a carriage return and then the
mergefields for the next line.

{ IF { MERGEFIELD "Address 2" } = "" "{ MERGEFIELD "City" } { MERGEFIELD
"State" } { MERGEFIELD "Zip" }" "{ MERGFIELD "Address 2" }[Enter]
{ MERGEFIELD "City" } { MERGEFIELD "State" } { MERGEFIELD "Zip" }" }

Ignore any line breaks that appear in the above in this message and where
[Enter] appears in the above field construction, press the "Enter" key.

You must use Ctrl+F9 to insert each pair of field delimiters { } and you use
Alt+F9 to toggle of their display.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
T

Tech Trainer

Hello Doug, I'm having this problem for letters in 2007. Would this label
fix also work for letters and am I putting the If...Then..else statement in
the letter where the address block should go? Sorry if I am being dense and
thanks for your help.

Kim

Doug Robbins - Word MVP said:
You need to use an If...then...Else field construction that checks for the
existence of data in Address 2. If there is none, it inserts the
mergefields that otherwise be on the next line; If there is data, it
inserts the Address 2 data and then inserts a carriage return and then the
mergefields for the next line.

{ IF { MERGEFIELD "Address 2" } = "" "{ MERGEFIELD "City" } { MERGEFIELD
"State" } { MERGEFIELD "Zip" }" "{ MERGFIELD "Address 2" }[Enter]
{ MERGEFIELD "City" } { MERGEFIELD "State" } { MERGEFIELD "Zip" }" }

Ignore any line breaks that appear in the above in this message and where
[Enter] appears in the above field construction, press the "Enter" key.

You must use Ctrl+F9 to insert each pair of field delimiters { } and you use
Alt+F9 to toggle of their display.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

Suzanne said:
i have created a label mail merge using data from an address list (excel)
not
all of the fields used have details ie address 2 is blank in some cases -
however i am unable to make the address lines shuffle up so there are no
blank lines on my lables
can anyone assist?
 
D

Doug Robbins - Word MVP

It will work for any type of mail merge. You should not however use the
Address Block field. Use the individual merge fields in your data source in
the configuration that you want them.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

Tech Trainer said:
Hello Doug, I'm having this problem for letters in 2007. Would this label
fix also work for letters and am I putting the If...Then..else statement
in
the letter where the address block should go? Sorry if I am being dense
and
thanks for your help.

Kim

Doug Robbins - Word MVP said:
You need to use an If...then...Else field construction that checks for
the
existence of data in Address 2. If there is none, it inserts the
mergefields that otherwise be on the next line; If there is data, it
inserts the Address 2 data and then inserts a carriage return and then
the
mergefields for the next line.

{ IF { MERGEFIELD "Address 2" } = "" "{ MERGEFIELD "City" } { MERGEFIELD
"State" } { MERGEFIELD "Zip" }" "{ MERGFIELD "Address 2" }[Enter]
{ MERGEFIELD "City" } { MERGEFIELD "State" } { MERGEFIELD "Zip" }" }

Ignore any line breaks that appear in the above in this message and where
[Enter] appears in the above field construction, press the "Enter" key.

You must use Ctrl+F9 to insert each pair of field delimiters { } and you
use
Alt+F9 to toggle of their display.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

Suzanne said:
i have created a label mail merge using data from an address list
(excel)
not
all of the fields used have details ie address 2 is blank in some
cases -
however i am unable to make the address lines shuffle up so there are
no
blank lines on my lables
can anyone assist?
 
B

Bob Bell

Why has this changed?

It worked fine in 2003 with out all this fuss!

What a step backwards!!

Bob

Doug Robbins - Word MVP said:
It will work for any type of mail merge. You should not however use the
Address Block field. Use the individual merge fields in your data source in
the configuration that you want them.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

Tech Trainer said:
Hello Doug, I'm having this problem for letters in 2007. Would this label
fix also work for letters and am I putting the If...Then..else statement
in
the letter where the address block should go? Sorry if I am being dense
and
thanks for your help.

Kim

Doug Robbins - Word MVP said:
You need to use an If...then...Else field construction that checks for
the
existence of data in Address 2. If there is none, it inserts the
mergefields that otherwise be on the next line; If there is data, it
inserts the Address 2 data and then inserts a carriage return and then
the
mergefields for the next line.

{ IF { MERGEFIELD "Address 2" } = "" "{ MERGEFIELD "City" } { MERGEFIELD
"State" } { MERGEFIELD "Zip" }" "{ MERGFIELD "Address 2" }[Enter]
{ MERGEFIELD "City" } { MERGEFIELD "State" } { MERGEFIELD "Zip" }" }

Ignore any line breaks that appear in the above in this message and where
[Enter] appears in the above field construction, press the "Enter" key.

You must use Ctrl+F9 to insert each pair of field delimiters { } and you
use
Alt+F9 to toggle of their display.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

i have created a label mail merge using data from an address list
(excel)
not
all of the fields used have details ie address 2 is blank in some
cases -
however i am unable to make the address lines shuffle up so there are
no
blank lines on my lables
can anyone assist?
 
G

Graham Mayor

It hasn't changed. If anything it has improved, but it was only ever
reasonably reliable for US addresses. Using individual fields always
provided more control.

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


Bob said:
Why has this changed?

It worked fine in 2003 with out all this fuss!

What a step backwards!!

Bob

Doug Robbins - Word MVP said:
It will work for any type of mail merge. You should not however use
the Address Block field. Use the individual merge fields in your
data source in the configuration that you want them.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

Tech Trainer said:
Hello Doug, I'm having this problem for letters in 2007. Would
this label fix also work for letters and am I putting the
If...Then..else statement in
the letter where the address block should go? Sorry if I am being
dense and
thanks for your help.

Kim

:

You need to use an If...then...Else field construction that checks
for the
existence of data in Address 2. If there is none, it inserts the
mergefields that otherwise be on the next line; If there is data,
it inserts the Address 2 data and then inserts a carriage return
and then the
mergefields for the next line.

{ IF { MERGEFIELD "Address 2" } = "" "{ MERGEFIELD "City" } {
MERGEFIELD "State" } { MERGEFIELD "Zip" }" "{ MERGFIELD "Address
2" }[Enter] { MERGEFIELD "City" } { MERGEFIELD "State" } {
MERGEFIELD "Zip" }" }

Ignore any line breaks that appear in the above in this message
and where [Enter] appears in the above field construction, press
the "Enter" key.

You must use Ctrl+F9 to insert each pair of field delimiters { }
and you use
Alt+F9 to toggle of their display.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of
my services on a paid consulting basis.

Doug Robbins - Word MVP

i have created a label mail merge using data from an address list
(excel)
not
all of the fields used have details ie address 2 is blank in some
cases -
however i am unable to make the address lines shuffle up so there
are no
blank lines on my lables
can anyone assist?
 

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