Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
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 | |
|
|
![]() |
||||
Thread | Forum | |||
Mail merge label only puts one label per page? | Mailmerge | |||
label merge--lost label template | Mailmerge | |||
label merge advancing only one label/pg | Mailmerge | |||
in label merge, can I start at a specific label spot? | Mailmerge | |||
How do you save a mail merge label document as JUST a label doc? | Mailmerge |