How do I code an If Then Else field when...

L

Llawler

I'm trying to create address labels through a mail merge and move up
remaining lines if a data field is blank.

For example: Some of the addresses do not include an organization name. If
this is the case, an awkward blank line is left between the name and the
street address.

How do I code it so that the lines move up if the organization field is blank?
 
D

Doug Robbins - Word MVP

{ IF { MERGEFIELD Organization }= "" "{ MERGEFIELD Address }" "{ MERGEFIELD
Organization }[line feed]{ MERGEFIELD Address }" }

Use Shift+Enter where [line feed] appears in this construction.

--
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
 
L

Llawler

Thanks for the code, Doug. I thought I knew where it goes, but I'm lost.

Thanks.

Doug Robbins - Word MVP said:
{ IF { MERGEFIELD Organization }= "" "{ MERGEFIELD Address }" "{ MERGEFIELD
Organization }[line feed]{ MERGEFIELD Address }" }

Use Shift+Enter where [line feed] appears in this construction.

--
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

Llawler said:
I'm trying to create address labels through a mail merge and move up
remaining lines if a data field is blank.

For example: Some of the addresses do not include an organization name. If
this is the case, an awkward blank line is left between the name and the
street address.

How do I code it so that the lines move up if the organization field is
blank?
 

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