Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
romeshomey romeshomey is offline
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
romeshomey romeshomey is offline
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
romeshomey romeshomey is offline
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default 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

Posting Rules

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I mail merge to EMAIL from MS Word AND add a pdf attachment Lily@Insight Mailmerge 24 January 15th 07 09:33 PM
printing difficultiies using mail merge in word flybynight Mailmerge 1 December 3rd 06 06:58 PM
Mail Merge Data Question Tom Bean Mailmerge 7 May 26th 06 12:02 AM
Mail merge - use specific fields in the contacts folder to customi Rachelle Mailmerge 1 November 29th 05 01:49 PM
Word 2003 and Access 2003 Mail Merge question HD87glide Microsoft Word Help 2 December 15th 04 02:29 PM


All times are GMT +1. The time now is 11:53 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"