Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Julie B Julie B is offline
external usenet poster
 
Posts: 3
Default Mergefield conditional, need to skip blank line

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!

--
Julie ~ Former WordPERFECT user.
Attempting to soak up all the knowledge from other generous Word & Excel
users to make my job easier.
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod macropod is offline
external usenet poster
 
Posts: 1,002
Default Mergefield conditional, need to skip blank line

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
--
macropod
[MVP - Microsoft Word]
-------------------------

"Julie B" wrote in message ...
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!

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


  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Julie B Julie B is offline
external usenet poster
 
Posts: 3
Default Mergefield conditional, need to skip blank line

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!!!
--
Julie ~ Former WordPERFECT user.
Attempting to soak up all the knowledge from other generous Word & Excel
users to make my job easier.


"macropod" wrote:

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
--
macropod
[MVP - Microsoft Word]
-------------------------

"Julie B" wrote in message ...
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!

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



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I skip blank lines when line numbering? DaRose46 Page Layout 2 March 10th 08 06:52 PM
If the mergefield is blank, delete the line. [email protected] Mailmerge 3 October 31st 06 06:09 AM
How do I skip page line numbers for blank lines?? Number nutso Page Layout 2 October 24th 06 08:53 PM
How do I skip line numbering on blank lines? MKA Page Layout 3 May 31st 05 02:05 PM
How to skip line numbers for all blank lines in a document Winnipegger Page Layout 1 February 25th 05 04:27 AM


All times are GMT +1. The time now is 08:36 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"