View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default 07 Merge Address

Assuming that if Address 3 is blank then Address 4 is also blank, you would
use the following field construction in which you must use Ctrl+F9 to insert
each pair of field delimiters { } and where the ¶ appears, you press the
Enter key so a new line is inserted at that point. You use Alt+F9 to toggle
off the display of the field codes.

{ IF { MERGEFIELD "Address 3" } "" "{ MERGEFIELD "Address 3" }¶
{ IF { MERGEFIELD "Address 4" } "" "{ MERGEFIELD "Address 4" }¶
{ MERGEFIELD "Address 5" }" "{ MERGEFIELD "Address 5" }" }" "{ MERGEFIELD
"Address 5" }" }

It will NOT work if you use the { and } keys on the keyboard to insert what
need to be field delimiters.
--
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, originally posted via msnews.microsoft.com
"Confused87" wrote in message
...
I have invoices which are lined up thus:

_Tenant_ Date: _Date_
_Unit_
_Address 1_
_Address 2_
_Address 3_ Invoice: _invoice number_
_Address 4_
_Address 5_

_X_ - this denotes merge field.

This is in a table so it will format correctly. In the Address Block
feature
if there is a blank(so if there's only an Address 1,2 and 5) it will just
fill in the next address line. I can't seperate them out, so when but when
I
create it through Insert Merge Field it allows blanks - any ideas what
Rules
I can use?

Cheers
C