If statement - delete line

P

PMS

I have a document that contains merge codes that fill in with state tax
information.: <<TAX_PERCENT_2>> <<TAX_DESC_2>> {IF {MERGEFIELD RISK_STATE} =
"KY" "plus collection fees" ""} <<TAX_AMOUNT_2>>. Now there will be some
instances where there may not be a KY tax percent, description or amount.
When I merge these files, I still get the "plus collection fees" verbiage.
How can I have that not merge when there is no other KY information? Using
Word 2003. Thanks, PMS
 
G

Graham Mayor

You appear to want

{IF { MERGEFIELD TAX_PERCENT_2 } <> "" "{ MERGEFIELD TAX_PERCENT_2 } {
MERGEFIELD TAX_DESC_2 }{IF {MERGEFIELD RISK_STATE} = "KY" " plus collection
fees "}{MERGEFIELD TAX_AMOUNT_2 }"}

ie if there is content in TAX_PERCENT_2 insert the rest with the addition of
plus collection fees when the RISK_STATE is KY

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
P

PMS

Perfect! Works like a charm. I almost had it, but after working on hundreds
of documents over the past couple of days, I couldn't see straight anymore!
Thanks, PMS
 
G

Graham Mayor

You are welcome :)

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top