Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / February 2008

Tip: Looking for answers? Try searching our database.

Suppress Blank Lines in Address (Word 2000-2003)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Wobbs - 25 Feb 2008 15:18 GMT
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?
Graham Mayor - 25 Feb 2008 15:37 GMT
The usual schematic for missing fields is

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

or for your alternative address

{ MERGEFIELD CustomerAdd1  }{  IF {  MERGEFIELD CustomerAdd2  } = "
{  MERGEFIELD CustomerAdd2  }" }{  IF {  MERGEFIELD CustomerAdd3  } = "
{  MERGEFIELD CustomerAdd3  }" }{  IF {  MERGEFIELD CustomerAdd4 } = "
{  MERGEFIELD CustomerAdd4  }" }{  IF {  MERGEFIELD CustomerAdd5  } = "
{  MERGEFIELD CustomerAdd5  }" }
{ MERGEFIELD CustomerPostCode  }

Thus { IF {  MERGEFIELD AddFlag  } = 0 "Client address" "Customer Address"

i.e.

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

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> Hi All
>
[quoted text clipped - 32 lines]
> data while maintaining the Flag to check for where the letter should
> be sent to?
Wobbs - 25 Feb 2008 16:03 GMT
Thanks for the quick response - I really appreciate it.

I give it a go and let you know how I get on - I'm not that familiar with
merge field data so this has been a bit of a struggle trying to figure it out.

Thanks again.

> The usual schematic for missing fields is
>
[quoted text clipped - 68 lines]
> > data while maintaining the Flag to check for where the letter should
> > be sent to?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.