View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default "remove blank lines"+"Mail Merge"

You can try smething like the following instead:

{ MERGEFIELD merit_pay \#"'Merit $0.00';'';''" }

(You can adjust the '$0.00' part as necessary)

If you need the field to be inserted with its original formatting then
you need the IF, but if for example you want


A
Merit $whatever
B

when merit_pay 0 and

A
B

when it perit_pay = 0, you can use

A{ IF { MERGEFIELD merit_pay } 0 "
Merit ${ MERGEFIELD merit_pay }" "" }
B

i.e. click enter immediately before the "M" of "Merit to insert a
paragraph mark in the output of the IF field.


Peter Jamieson

http://tips.pjmsn.me.uk

John wrote:
I've got a mail merge document that has a separate line for some numeric
amounts
(Base Pay, Adjustment, Merit Pay, etc.). The IF-THEN-ELSE statement I am
using works: ({IF {MERGEFIELD} merit_pay} 0 "Merit ${MERGEFIELD}
merit_pay}"""}
but if merit_pay IS zero, it leaves a blank line in the document. How do I
get it to remove the blank line. The user wants all of the amounts to show,
on separate lines, lined up, but to not show any lines if there is no data on
that line AND she doesn't want the blank line to show either. She wants
subsequent lines to 'float up'.