Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Mail Merge If / Else Question / Gender Specific?
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. |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Mail Merge If / Else Question / Gender Specific?
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 "romeshomey" wrote in message ... 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. |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Mail Merge If / Else Question / Gender Specific?
Thanks. I will try that in the morning anand let you know. I really
appreciate the help. "Doug Robbins - Word MVP" wrote: 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 "romeshomey" wrote in message ... 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. |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Mail Merge If / Else Question / Gender Specific?
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." } } "Doug Robbins - Word MVP" wrote: 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 "romeshomey" wrote in message ... 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. |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Mail Merge If / Else Question / Gender Specific?
Are you using Ctrl+F9 to insert each pair of field braces?
-- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "romeshomey" wrote in message ... 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." } } "Doug Robbins - Word MVP" wrote: 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 "romeshomey" wrote in message ... 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. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I mail merge to EMAIL from MS Word AND add a pdf attachment | Mailmerge | |||
printing difficultiies using mail merge in word | Mailmerge | |||
Mail Merge Data Question | Mailmerge | |||
Mail merge - use specific fields in the contacts folder to customi | Mailmerge | |||
Word 2003 and Access 2003 Mail Merge question | Microsoft Word Help |