View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default need help with a macro

Use an If...then...Else... field

{ IF { MERGEFIELD sex } = "F" "Ms." Mr." }

The easiest way for you to do this is to insert that field for the Word
Fields pulldown. If you enter it directly from the keyboard, use Ctrl+F9 to
insert each pair of field delimiters { }


--
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

"mehherc" u19268@uwe wrote in message news:5ca9830e4a674@uwe...
Ok, I cannot seem to figure this out or at least get it to work right.
What I
am doing is trying to bring a list customers from an excel sheet and have
their lastname print on it with the proper salutation for them in a Word
document. In the excel sheet, the columns are labeled as lastname then
firstname then sex. When I use the mailmerge option, i get either the sex
and lastname(F Martinez) or firstname lastname (Emilia Martinez). I want
it
to show Ms. Martinez.. I cannot do a substitutionon the Excel sheet. If I
could, the problem would have been solved along time ago. I am a little
frustrated by it. I have been working on it for 2 days now. I need the
Word
document to read " Dear Ms. Martinez,".

Sorry for the whining. I am just aggravated at it now.