mail merge if.....then...else

P

program00000001

how exactly does one write the following in a mail merge

if address1 then address 1 if address2
then address 2
city
state
zip

"if fruit=apples print x, if fruit=prunes print Y else
print Z
 
C

Cindy M -WordMVP-

Hi Program00000001,

1. Ctrl+F9 to insert a pair of field brackets

2. construct the IF field. Basic syntax:

{ IF "thing to compare" = "value" "true phrase" "false
phrase" }

Note the use of "quotes", and no commas or anything else!
Only if the data you're comparing is numeric would you
(perhaps!) be able to do without the first two pairs of
"quotes".

In order to test for an empty string, use a pair of quotes:
""

You can insert the mergefields as you always would, but you
might need to press Alt+F9 when you do in order to toggle
the field codes back on. Alt+F9 when you're finished to
turn the field codes off.
how exactly does one write the following in a mail merge

if address1 then address 1 if address2
then address 2
city
state
zip

"if fruit=apples print x, if fruit=prunes print Y else
print Z

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Sep 30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:)
 

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