Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
ARY
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Charles Kenyon
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod
 
Posts: n/a
Default 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

Posting Rules

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Add an option to require data entry for a form field Reedo Microsoft Word Help 0 November 29th 05 08:22 PM
Suppressing Merge Field and text before/after julie Microsoft Word Help 8 November 14th 05 02:50 PM
How do I include photos into a merged document as a field? MichaelK Mailmerge 5 July 21st 05 07:04 PM
Word form field that lets you include instructions that disappear Joan Microsoft Word Help 1 January 12th 05 05:48 PM
Text Form Field Ref in Footer Won't Update on Screen StarWine Microsoft Word Help 3 December 6th 04 06:17 PM


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