#1   Report Post  
Posted to microsoft.public.word.docmanagement
mmdmyoung mmdmyoung is offline
external usenet poster
 
Posts: 2
Default Label Merge

I have a datasource created in excel. Included in the list are name,
address1, address2, city, state, zip. The problem is when I import them into
excel, if there are blanks for address2, I get a blank line on my labels. Is
there any way the blank line can be eliminated on the label if there is not
an address2.

Thanks!
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default Label Merge

Yes. You need to use an IF field that prints address2 if it exists, along
with a line break. Since the line break will be included only if the address
is printed, you will not get a blank line. The syntax of the field should be
as follows:

{ IF { MERGEFIELD address2 } = "" "" "{ MERGEFIELD address2 }
" }

Note the line break between the mergefield and the closing quote in the
FalseText in this field.

Although you can get a start on this IF field using the Insert Word Field
button on the Mail Merge toolbar, it will not permit you to insert a
mergefield as your FalseText; you'll have to insert a placeholder and then
manually edit the IF field, so you might as well create it manually to begin
with:

1. Press Ctrl+F9 to insert the outside field delimiters (the things that
look like braces but can't be entered from the keyboard).

2. Between the field braces, type all the content except the mergefields.

3. Use the Insert Merge Field button to insert { MERGEFIELD address2 } in
the two locations where it is needed.

4. F9 to update/toggle the field code.

Alternative syntax for the field (which uses the merge field as the TrueText
and eliminates the FalseText) is:

{ IF { MERGEFIELD address2 } "" "{ MERGEFIELD address2 }
" }

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

"mmdmyoung" wrote in message
...
I have a datasource created in excel. Included in the list are name,
address1, address2, city, state, zip. The problem is when I import them
into
excel, if there are blanks for address2, I get a blank line on my labels.
Is
there any way the blank line can be eliminated on the label if there is
not
an address2.

Thanks!


  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default Label Merge

Yes. You need to use an IF field that prints address2 if it exists, along
with a line break. Since the line break will be included only if the address
is printed, you will not get a blank line. The syntax of the field should be
as follows:

{ IF { MERGEFIELD address2 } = "" "" "{ MERGEFIELD address2 }
" }

Note the line break between the mergefield and the closing quote in the
FalseText in this field.

Although you can get a start on this IF field using the Insert Word Field
button on the Mail Merge toolbar, it will not permit you to insert a
mergefield as your FalseText; you'll have to insert a placeholder and then
manually edit the IF field, so you might as well create it manually to begin
with:

1. Press Ctrl+F9 to insert the outside field delimiters (the things that
look like braces but can't be entered from the keyboard).

2. Between the field braces, type all the content except the mergefields.

3. Use the Insert Merge Field button to insert { MERGEFIELD address2 } in
the two locations where it is needed.

4. F9 to update/toggle the field code.

Alternative syntax for the field (which uses the merge field as the TrueText
and eliminates the FalseText) is:

{ IF { MERGEFIELD address2 } "" "{ MERGEFIELD address2 }
" }

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

"mmdmyoung" wrote in message
...
I have a datasource created in excel. Included in the list are name,
address1, address2, city, state, zip. The problem is when I import them
into
excel, if there are blanks for address2, I get a blank line on my labels.
Is
there any way the blank line can be eliminated on the label if there is
not
an address2.

Thanks!


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail merge label only puts one label per page? Ebb Berry Mailmerge 4 April 21st 23 12:06 PM
label merge--lost label template LNO Mailmerge 2 May 4th 07 02:51 PM
label merge advancing only one label/pg kuleama Mailmerge 1 May 1st 07 08:52 PM
in label merge, can I start at a specific label spot? RNS Mailmerge 1 August 16th 06 04:23 AM
How do you save a mail merge label document as JUST a label doc? GailD Mailmerge 3 March 29th 06 06:52 PM


All times are GMT +1. The time now is 04:00 AM.

Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"