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 / March 2008

Tip: Looking for answers? Try searching our database.

Mergefield conditional, need to skip blank line

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Julie B - 27 Mar 2008 00:48 GMT
Hello,

I am using Mailmerge and have created some conditional formatting in order
to skip certain fields if the data is blank. However, now the blank lines are
being left in my document.  Is there another mergefield code I can use to
remove blank lines?

Here is what I have so far:

First three lines are fine, blank lines are skipped because there is no
conditional formatting:
{ MERGEFIELD “First_Name” } { MERGEFIELD “Last_Name” }
{ MERGEFIELD AgencyCompany }
{ MERGEFIELD “Address” }
Then the fourth line is this:
{ IF{ MERGEFIELD “City” } <>”” “{ MERGEFIELD “City” } “ }{ IF{ MERGEFIELD
State } <>”” “{MERGEFIELD State }  “ }{ IF{ MERGEFIELD Zip_Code } <>”” “{
MERGEFIELD Zip_Code }” }

I would like to tell the fourth line to skip if it is blank.  Any help would
be appreciated.  Thank you!

Signature

Julie ~ Former WordPERFECT user.
Attempting to soak up all the knowledge from other generous Word & Excel
users to make my job easier.

macropod - 27 Mar 2008 02:21 GMT
Hi Julie,

Assuming you mean that you only want to suppress the line if the City, State and Zip Code are all *blank*, you could code the field
like:
{IF{QUOTE "{MERGEFIELD City}{MERGEFIELD State}{MERGEFIELD Zip_Code}"}= "" "" "¶{IF{MERGEFIELD City}<> "" "{MERGEFIELD City}
"}{IF{MERGEFIELD State}<> "" "{MERGEFIELD State} "}{MERGEFIELD Zip_Code}"}
and attach it to your {MERGEFIELD Address} line. Note the absence of spaces between the fields embedded within the QUOTE field, and
the '¶'. You'd insert a real paragraph mark or line-feed into the code at the '¶' point.

Cheers
Signature

macropod
[MVP - Microsoft Word]
-------------------------

> Hello,
>
[quoted text clipped - 17 lines]
> I would like to tell the fourth line to skip if it is blank.  Any help would
> be appreciated.  Thank you!
Julie B - 27 Mar 2008 18:30 GMT
Macropod,

Thank you sooooo much!  I squealed with delight when it worked, because I
had been trying to figure out something on my own for days.

I just love coming to these discussion boards to find people who know
everything about the programs that I despise.  It helps me do my job better!

Thanks again!!!
Signature

Julie ~ Former WordPERFECT user.
Attempting to soak up all the knowledge from other generous Word & Excel
users to make my job easier.

> Hi Julie,
>
[quoted text clipped - 27 lines]
> > I would like to tell the fourth line to skip if it is blank.  Any help would
> > be appreciated.  Thank you!
 
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.