View Single Post
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Wobbs Wobbs is offline
external usenet poster
 
Posts: 2
Default Suppress Blank Lines in Address (Word 2000-2003)

Hi All

I'm trying to suppress blank lines in address data. All is fine when I use
the following info:

This Works:
{ MERGEFIELD ClientAdd1 }{ IF { MERGEFIELD ClientAdd1 } = "" "" " " }
{ MERGEFIELD ClientAdd2 }{ IF { MERGEFIELD ClientAdd2 } = "" "" " " }
{ MERGEFIELD ClientAdd3 }{ IF { MERGEFIELD ClientAdd3 } = "" "" " " }
{ MERGEFIELD ClientAdd4 }{ IF { MERGEFIELD ClientAdd4 } = "" "" " " }
{ MERGEFIELD ClientAdd5 }{ IF { MERGEFIELD ClientAdd5 } = "" "" " " }
{ MERGEFIELD ClientPostCode }


My problem is one of my documents has a flag that switches the address of
where we would send the letter to. I have 5 lines of address info that are
unspecified by what address type data it holds except the Post Code (Zip
Code).

With regards to the above - address fields look like this:

{ IF { MERGEFIELD AddFlag } = 0 { MERGEFIELD ClientAdd1 }{ MERGEFIELD
CustomerAdd1 } }
{ IF { MERGEFIELD AddFlag } = 0 { MERGEFIELD ClientAdd2 }{ MERGEFIELD
CustomerAdd2 } }
{ IF { MERGEFIELD AddFlag } = 0 { MERGEFIELD ClientAdd3 }{ MERGEFIELD
CustomerAdd3 } }
{ IF { MERGEFIELD AddFlag } = 0 { MERGEFIELD ClientAdd4 }{ MERGEFIELD
CustomerAdd4 } }
{ IF { MERGEFIELD AddFlag } = 0 { MERGEFIELD ClientAdd5 }{ MERGEFIELD
CustomerAdd5 } }
{ IF { MERGEFIELD AddFlag } = 0 { MERGEFIELD ClientPostCode }{ MERGEFIELD
CustomerPostCode} }

Can anybody tell me how I can suppress blank lines of this address data
while maintaining the Flag to check for where the letter should be sent to?