Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Include an or option in IF statement: IF field = _ OR= _ then
MSWord 2003
The "If then Else" is too basic. Should include more options, like 'or' to automate. For example, in a familiar salutation: If a person is a Mr. or Ms., we want to use first name. If a person is a Judge, though, we want to use Judge. So the first if statement should contain an 'or' instead of doing a list of If statements. In earlier versions of MSWord (before the love affair with drop-down boxes) i could type in chevrons and get the job done myself. Now it is a mess. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/office/comm...merge.fi elds |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Include an or option in IF statement: IF field = _ OR= _ then
This can be done without any fancy structure.
{IF { MERGEFIELD TITLE } = "Mr." "{ MERGEFIELD FIRSTNAME }"}{IF { MERGEFIELD TITLE } = "Ms." "{ MERGEFIELD FIRSTNAME }"}{IF { MERGEFIELD TITLE } = "Judge" "Judge"} Might not be as elegant, but it gets the job done. -- 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. "ARY" wrote in message ... MSWord 2003 The "If then Else" is too basic. Should include more options, like 'or' to automate. For example, in a familiar salutation: If a person is a Mr. or Ms., we want to use first name. If a person is a Judge, though, we want to use Judge. So the first if statement should contain an 'or' instead of doing a list of If statements. In earlier versions of MSWord (before the love affair with drop-down boxes) i could type in chevrons and get the job done myself. Now it is a mess. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/office/comm...merge.fi elds |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Include an or option in IF statement: IF field = _ OR= _ then
You can still do things manually - see
http://www.gmayor.com/mail_merge_lab...th_word_xp.htm and http://www.gmayor.com/formatting_word_fields.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org ARY wrote: MSWord 2003 The "If then Else" is too basic. Should include more options, like 'or' to automate. For example, in a familiar salutation: If a person is a Mr. or Ms., we want to use first name. If a person is a Judge, though, we want to use Judge. So the first if statement should contain an 'or' instead of doing a list of If statements. In earlier versions of MSWord (before the love affair with drop-down boxes) i could type in chevrons and get the job done myself. Now it is a mess. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/office/comm...merge.fi elds |
#4
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Include an or option in IF statement: IF field = _ OR= _ then
Actually, Word DOES have an OR function, documented in the help file - look
under 'functions'. However, Word's OR function only works for two numeric conditions. For testing multiple conditions, especially where text is involved, try something like: {IF{={IF{MERGEFIELD Title}= "Mr" 1 0}+{IF{MERGEFIELD Title}= "Mrs" 1 0}+{IF{MERGEFIELD Title}= "Ms" 1 0}}=1 {MERGEFIELD Name} {MERGEFIELD Title}} For an AND test with multiple conditions, you'd replace the '+' signs with '*'. Cheers "ARY" wrote in message ... MSWord 2003 The "If then Else" is too basic. Should include more options, like 'or' to automate. For example, in a familiar salutation: If a person is a Mr. or Ms., we want to use first name. If a person is a Judge, though, we want to use Judge. So the first if statement should contain an 'or' instead of doing a list of If statements. In earlier versions of MSWord (before the love affair with drop-down boxes) i could type in chevrons and get the job done myself. Now it is a mess. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/office/comm...merge.fi elds |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Add an option to require data entry for a form field | Microsoft Word Help | |||
Suppressing Merge Field and text before/after | Microsoft Word Help | |||
How do I include photos into a merged document as a field? | Mailmerge | |||
Word form field that lets you include instructions that disappear | Microsoft Word Help | |||
Text Form Field Ref in Footer Won't Update on Screen | Microsoft Word Help |