Group:  Microsoft Word ยป microsoft.public.word.mailmerge.fields
Thread: If statement - delete line

Geek News

If statement - delete line
PMS 11/21/2008 2:03:01 PM
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
Re: If statement - delete line
"Graham Mayor" <gmayor[ at ]REMOVETHISmvps.org> 11/21/2008 2:30:00 PM
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

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


PMS wrote:
[Quoted Text]
> 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


Re: If statement - delete line
PMS 11/21/2008 2:56:11 PM
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

"Graham Mayor" wrote:

[Quoted Text]
> 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
>
> My web site www.gmayor.com
> Word MVP web site http://word.mvps.org
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>
>
> PMS wrote:
> > 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
>
>
>
Re: If statement - delete line
"Graham Mayor" <gmayor[ at ]REMOVETHISmvps.org> 11/21/2008 3:23:33 PM
You are welcome :)

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

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


PMS wrote:
[Quoted Text]
> 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
>
> "Graham Mayor" wrote:
>
>> 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
>>
>> My web site www.gmayor.com
>> Word MVP web site http://word.mvps.org
>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>
>>
>> PMS wrote:
>>> 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


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net