Mail Merge If / Else Question / Gender Specific?

G

Guest

Basically I have a document where I have mail merged the gender column to the
Dear Mr. / Mrs. area of the document.

I have it working where if the Gender column is male is assigns a Mr. or if
not male it assigns a Mrs. as so.

{ IF m <> "m" "Ms." "Mr." }

Problem is, alot of the Genders are blank in the source, so where the Gender
column is blank I want it to assign the First_Name from another column
instead.

So for instance.

If the gender is m or f it assigns Mr. or Mrs., but if no gender is defined
in the column, it assigns First_Name from the First_Name column instead.

I am baffled.
 
D

Doug Robbins - Word MVP

Use

{ IF { MERGEFIELD gender } = "" { MERGEFIELD First_Name } { IF { MERGEFIELD
gender } <> "m" "Ms," "Mr." } }

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
G

Guest

Thanks. I will try that in the morning anand let you know. I really
appreciate the help.
 
G

Guest

There seems to be a problem with the code somewhere. I haven't been able to
get the following to work. I will enter the code, save, then it changes and
removes part of it, so I assume there is an error somewhere.

{ IF { MERGEFIELD Gender } = "" { MERGEFIELD Owner_First_Name } { IF {
MERGEFIELD Gender } <> "m" "Ms." "Mr." } }
 
S

Suzanne S. Barnhill

Are you using Ctrl+F9 to insert each pair of field braces?

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 

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