How can I write IF statements in Mail Merge

S

Sayali

Hi,
I need to create Labels using Mail Merge. I have the following format for
the labels
First Name Last Name
Addr1
Addr2
Phone Number

I wanted to know how to supress a line if the data for that entry is not
available. Say for example if Addr 2 is blank then I want the output to look
like

First Name Last Name
Addr1
Phone Number

But I am getting the output that looks like this

First Name Last Name
Addr1

Phone Number


I am new at this so I wanted to know if there is any way in which I can
suppress the empty line?

Thanx in advance
Sayali
 
G

Graham Mayor

Insert a conditional field on the previous line e.g.

{Mergefield Addr1}{IF {Mergefield Addr2} <> "" "
{Mergefield Addr2}"}

Note the positions of the line break and the quote marks.
Field boundaries are inserted with CTRL+F9
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
T

Tab

I have a complicated if statements in my mailmerge. When I processed it - it
came out incorrectly....can someone 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 thought I did it correctly but apparently not....it comes out like this:
Thank you for your generous gift of $50.00, which we received on March 03,
2005 {ifVILN= “BKREM†“to purchase a Book of Remembrance.†“{ifVILN= “CEMCâ€
“for the cemetery care program.†“{ifVILN= “COF†“to support the Celebration
of Freedom.†“{ifVILN= “COT†“to support the Climate of Trust program.â€
“{ifVILN= “COTR†“to welcome the FSU delegates at the annual Climate of Trust
Reception.†“{ifVILN= “FOOD†“to purchase a food parcel(s) to the FSU.â€
“{ifVILN= “INHON†“in honor of NAME of HONOREE†“{ifVILN= “INKND†“for the
in kind gift of NAME OF GIFT†“{ifVILN= “INMEM†“in memory of NAME OF
PERSON(S)†“{ifVILN= “KPPT†“to purchase a Kippot.†“{ifVILN= “MANNA†“for
the Manna Program.†“{ifVILN= “MJSCH†“to support the Minsk Jewish School
through the Bay Area Council.†“{ifVILN= “MOSTM†“to purchase a MOST
magazine.†“{ifVILN= “VILN†“to aide the elderly in the town of Vilnius.â€
“{ifVILN= “YADLY†“to support the Yad L’Yad (Hand to Hand) Program.â€
“{ifVILN= “YSF†“to support and aid Yana Slobodova in her return to the
United States.â€}â€}â€}â€}â€}â€}â€}â€}â€}â€}â€}â€}â€}â€}â€}â€} Your continuing support means
a lot to us.

I want it to determine that if the RESON is "FOOD" then the text that will
be displayed will say "to purchase a food parcel" or if the RESON is "BKREM"
then the text should say "to purchase a Book of Remembrance"...and so
on...not sure where I messed up.

Please help - need to get this finished!!! =)
 
G

Graham Mayor

Answered in your later repeated question?

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
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