Mail Merge If Statements (Word 02)

T

Tab

I am having difficulty with my if statements in mail merge. It's quite long
and complicated and I can figure out where I messed up....If someone can
please help!!!

This is what I wrote:
{if«RESON»= “BKREM†“to purchase a Book of Remembrance.†“{if«RESON»= “CEMCâ€
“for the cemetery care program.†“{if(«RESON»= “COF†“to support the
Celebration of Freedom.†“{if«RESON»= “COT†“to support the Climate of Trust
program.†“{if«RESON»= “COTR†“to welcome the FSU delegates at the annual
Climate of Trust Reception.†“{if«RESON»= “FOOD†“to purchase a food
parcel(s) to the FSU.†“{if«RESON»= “INHON†“in honor of NAME of HONOREEâ€
“{if«RESON»= “INKND†“for the in kind gift of NAME OF GIFT†“{if«RESON»=
“INMEM†“in memory of NAME OF PERSON(S)†“{if«RESON»= “KPPT†“to purchase a
Kippot.†“{if«RESON»= “MANNA†“for the Manna Program.†“{if«RESON»= “MJSCHâ€
“to support the Minsk Jewish School through the Bay Area Council.â€
“{if«RESON»= “MOSTM†“to purchase a MOST magazine.†“{if«RESON»= “VILN†“to
aide the elderly in the town of Vilnius.†“{if«RESON»= “YADLY†“to support
the Yad L’Yad (Hand to Hand) Program.†“{if«RESON»= “YSF†“to support and aid
Yana Slobodova in her return to the United
States.â€}â€}â€}â€}â€}â€}â€}â€}â€}â€}â€}â€}â€}â€}â€}â€}.

I want it to determine if the reason corresponds to what it is equal to it
will display the correct text....and that's all. Right now, It displays all
of this info in the word document...and that is not what I want.
 
G

Graham Mayor

Three problems leap off the page
1. There is a limit on the number of fields that can be nested. The fields
here do not require nesting.
2. You are using smart quotes. You should use straight quotes.
3. You have probably simply typed the fields rather than used CTRL+F9 to
insert the field boundaries.

What you need to do is to set a series of conditional fields each following
the one before with no spacing between them. Type from the keyboard using
CTRL+F9 for each pair of field boundaries {}

Thus:

{ IF{Mergefield RESON} = "BKREM" "to purchase a Book of Remembrance.
"}{IF{Mergefield RESON} = "CEMC " "for the cemetery care program.
"}{IF({Mergefield RESON} = "COF " "to support the Celebration of Freedom.
"}{IF{Mergefield RESON} = "COT " "to support the Climate of Trust program.
" }{IF{Mergefield RESON} = "COTR " "to welcome the FSU delegates at the
annual Climate of Trust Reception. "}{IF{Mergefield RESON} = "FOOD " "to
purchase a food parcel(s) to the FSU. "}{IF{Mergefield RESON} = "INHON "
"in honor of NAME of HONOREE "}{IF{Mergefield RESON} = "INKND " "for the
in kind gift of NAME OF GIFT "}{IF{Mergefield RESON} = "INMEM " "in memory
of NAME OF PERSON(S) "}{IF{Mergefield RESON} = "KPPT " "to purchase a
Kippot. "}{IF{Mergefield RESON} = "MANNA " "for the Manna Program.
"}{IF{Mergefield RESON} = "MJSCH " "to support the Minsk Jewish School
through the Bay Area Council. "}{IF{Mergefield RESON} = "MOSTM " "to
purchase a MOST magazine. "}{IF{Mergefield RESON} = "VILN " "to aid the
elderly in the town of Vilnius. " "{IF{Mergefield RESON} = "YADLY " "to
support the Yad L'Yad (Hand to Hand) Program. "}{IF{Mergefield RESON} =
"YSF " "to support and aid Yana Slobodova in her return to the United
States. "}.


Incidentally 'aid' doesn't have an 'e' in this context.


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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
Top