View Single Post
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Jan
 
Posts: n/a
Default Supress blank lines

Graham,
Thank you for sticking with me. I interpreted your example as using the
If..then statement because I didn't see the double quotes following the line
break/single quote, which are put in automatically using the Toolbar 'Insert
Word Field' options - in the If...Then option. I have tested this and found
it works both with or without the double quote then portion, as long as the
line break is in the correct position.
I have enjoyed learning something new and again, appreciate your help.
Jan


"Graham Mayor" wrote:

The fields are not nested, they are separate and evaluated individually
based on the content of the fields. There is no 'Then' involved. If the
field does not contain $0.00 the response is to insert a line break and the
field. If it contains $0.00 it does nothing. Your interpretation of this
does not include the line break.

--

Graham Mayor - Word MVP

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



Jan wrote:
Graham, I appreciate your reply very much. I have tried this, however
I believe that after the first PAID1 is true (PAID1 $0.00), the
calculation ends and the 'Then' (which contains the rest of the
nested If...Then statements) is ignored causing the remaining PAID2,
PAID3 to be mute.
When I tried this without nesting the If...Then statements together,
{IF {MERGEFIELD PAID1} "$0.00" "{MERGEFIELD PAID1} " "} and
just
used them in a straight column, the mergefields that did = $0.00
placed a space in the line, causing the blank lines to remain and not
supress together. I believe I need a way when the condition = $0.00 a
null results.

I also appreciate your comment on the text box vs table frame. The
data in this form can not grow or shrink outside the area it's given
- the reason for using the text box.

Thank you again,
Jan


"Graham Mayor" wrote:

You ned a string of conditional fields each following the previous
on the same line, with the line breaks included as part of the
result.

{ IF{ MERGEFIELD PAID1 } "$0.00" "{ MERGEFIELD PAID1 }
" }{ IF{ MERGEFIELD PAID2 } "$0.00" "{ MERGEFIELD PAID2 }
" }{ IF{ MERGEFIELD PAID3 } "$0.00" "{ MERGEFIELD PAID3 }
" }{ IF{ MERGEFIELD PAID4 } "$0.00" "{ MERGEFIELD PAID4 }
" }{ IF{ MERGEFIELD PAID5 } "$0.00" "{ MERGEFIELD PAID5 }
" }{ IF{ MERGEFIELD SP_PAID1 } "$0.00" "{ MERGEFIELD SP_PAID1 }
" }{ IF{ MERGEFIELD SP_PAID2 } "$0.00" "{ MERGEFIELD SP_PAID2 }
" }{ IF{ MERGEFIELD SP_PAID3 } "$0.00" "{ MERGEFIELD SP_PAID3 }
" }

Text boxes are not the greatest plan and will not grow or shrink to
accommodate the text. I would use a table cell or a frame with auto
height setting.

--

Graham Mayor - Word MVP

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


Jan wrote:
The data source is a .csv file we receive for a merge form letter.
It contains $0.00 in any amount field when no $$$ exist. The data
from up to 10 columns are placed in rows within a text box. (See
below). I need to supress all lines when $0.00 exists. For example:
PAID1 = $50, PAID2 = $25, PAID3 = $0.00, PAID4 = $0.00, PAID5 =
$0.00, SP_PAID1 = $100, SP_PAID2 = $0.00, SP_PAID3 = $0.00 - we can
only show three rows (PAID1, PAID2, SP_PAID1) with SPPAID1 directly
underneath PAID2. I have tried if...then statements, switches, and a
variety of options with no success in removing rows with $0.00. Any
help would be appreciated. Thank you.

{MERGEFIELD "PAID1"}
{MERGEFIELD "PAID2"}
{MERGEFIELD "PAID3"}
{MERGEFIELD "PAID4"}
{MERGEFIELD "PAID5"}
{MERGEFIELD "SP_PAID1"}
{MERGEFIELD "SP_PAID2"}
{MERGEFIELD "SP_PAID3"}