Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
IF Statement
I must not understand the construct of IF statements in a mail merge.
I have a Word document (2003) set up as a mail merge from an Access (2003) database. The records pull contain a field "Sex". The value of that field is either "M" or "F". I would like to have the Word document have a sentence such as: First has been recognized because because of his/her blah blah blah. Instead of "he/she", I would like either "he" or "she". Looking at: http://support.microsoft.com/?kbid=214827 it appears the structure is: {if {Sex}= "M" "he" {if {Sex}= "F" "she"}"} Yet, that does not merge anything. So, now I am not certain what to do. I would appreciate your help with this. |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
IF Statement
{IF {Mergefield Sex \*lower} = "m" "he" "she"}
will do the trick. Field boundaries are inserted with CTRL+F9. The rest is typed. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Shoelaces wrote: I must not understand the construct of IF statements in a mail merge. I have a Word document (2003) set up as a mail merge from an Access (2003) database. The records pull contain a field "Sex". The value of that field is either "M" or "F". I would like to have the Word document have a sentence such as: First has been recognized because because of his/her blah blah blah. Instead of "he/she", I would like either "he" or "she". Looking at: http://support.microsoft.com/?kbid=214827 it appears the structure is: {if {Sex}= "M" "he" {if {Sex}= "F" "she"}"} Yet, that does not merge anything. So, now I am not certain what to do. I would appreciate your help with this. |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
IF Statement
"Graham Mayor" wrote:
{IF {Mergefield Sex \*lower} = "m" "he" "she"} will do the trick. Field boundaries are inserted with CTRL+F9. The rest is typed. Thank you. I am confused by what is typed and what is inserted. I have tried many combinations and have not produced a working solution. May I bother you to explain what to type before I click CTRL+F9? |
#4
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
IF Statement
Got it! I needed two inserts.
Thank you kindly for your help, |
#5
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
IF Statement
If you want a fairly complete set of IF field for gender-specific words, see
the Gender Add-In at http://addbalance.com/word/download.htm. While that uses tests for a Document Property rather than a merge variable, I would think the fields would be readily adaptable. -- Charles Kenyon Word New User FAQ & Web Directory: http://addbalance.com/word Intermediate User's Guide to Microsoft Word (supplemented version of Microsoft's Legal Users' Guide) http://addbalance.com/usersguide See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome! --------- --------- --------- --------- --------- --------- This message is posted to a newsgroup. Please post replies and questions to the newsgroup so that others can learn from my ignorance and your wisdom. "Shoelaces" wrote in message ... I must not understand the construct of IF statements in a mail merge. I have a Word document (2003) set up as a mail merge from an Access (2003) database. The records pull contain a field "Sex". The value of that field is either "M" or "F". I would like to have the Word document have a sentence such as: First has been recognized because because of his/her blah blah blah. Instead of "he/she", I would like either "he" or "she". Looking at: http://support.microsoft.com/?kbid=214827 it appears the structure is: {if {Sex}= "M" "he" {if {Sex}= "F" "she"}"} Yet, that does not merge anything. So, now I am not certain what to do. I would appreciate your help with this. |
#6
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
IF Statement
You don't need to 'insert' anything, and if you try a more complex
conditional field you will not be able to insert into the dialog boxes. Build the fields by hand. Type CTRL+F9 which will give you {} then between the brackets type the rest as I have listed it (with CTRL+F9 for the second pair of brackets.) If you select a piece of text eg Mergefield Sex before pressing CTRL+F9, that key combination will put the brackets round the selected text. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Shoelaces wrote: Got it! I needed two inserts. Thank you kindly for your help, |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Q: IF statement in table in Word | Microsoft Word Help | |||
Statement parameter in Mailmerge.OpenDataSource | Mailmerge | |||
Possible BUG: Multiple HTTPrequests send from one includetext statement | Mailmerge | |||
How do I copy a scanned signature into an if/or statement in Word | Mailmerge | |||
Insert carriage return in mergefield statement | Mailmerge |