Reply
 
Thread Tools Display Modes
  #1   Report Post  
Sayali
 
Posts: n/a
Default How can I write IF statements in Mail Merge

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
  #2   Report Post  
Graham Mayor
 
Posts: n/a
Default

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

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





Sayali wrote:
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



  #3   Report Post  
Tab
 
Posts: n/a
Default

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 LYad (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 LYad (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!!! =)


"Graham Mayor" wrote:

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

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





Sayali wrote:
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




  #4   Report Post  
Graham Mayor
 
Posts: n/a
Default

Answered in your later repeated question?

--

Graham Mayor - Word MVP

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




Tab wrote:
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:
{ifRESON= "BKREM" "to purchase a Book of Remembrance." "{ifRESON=
"CEMC" "for the cemetery care program." "{if(RESON= "COF" "to
support the Celebration of Freedom." "{ifRESON= "COT" "to support
the Climate of Trust program." "{ifRESON= "COTR" "to welcome the
FSU delegates at the annual Climate of Trust Reception." "{ifRESON=
"FOOD" "to purchase a food parcel(s) to the FSU." "{ifRESON=
"INHON" "in honor of NAME of HONOREE" "{ifRESON= "INKND" "for the
in kind gift of NAME OF GIFT" "{ifRESON= "INMEM" "in memory of NAME
OF PERSON(S)" "{ifRESON= "KPPT" "to purchase a Kippot."
"{ifRESON= "MANNA" "for the Manna Program." "{ifRESON= "MJSCH"
"to support the Minsk Jewish School through the Bay Area Council."
"{ifRESON= "MOSTM" "to purchase a MOST magazine." "{ifRESON=
"VILN" "to aide the elderly in the town of Vilnius." "{ifRESON=
"YADLY" "to support the Yad L'Yad (Hand to Hand) Program."
"{ifRESON= "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!!! =)


"Graham Mayor" wrote:

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

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





Sayali wrote:
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



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Merge Word 2003 Issue S.Nicks Mailmerge 5 February 20th 09 01:55 AM
mail merge with attachments AS Mailmerge 5 April 9th 05 09:49 AM
Mail Merge Issue With Office 97 - Excel Data Source Matt Thorley Mailmerge 1 February 15th 05 11:38 PM
Word-Excel 2003 - Mail Merge Recipients problem AYager Mailmerge 2 January 11th 05 04:11 AM
Using Hyperlinks in Mail Merge IF...THEN...ELSE Statements Mark V Mailmerge 8 November 30th 04 01:31 PM


All times are GMT +1. The time now is 08:56 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"