Thread: or function
View Single Post
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default or function

You can copy field constructions using the macro on my web site
http://www.gmayor.com/export_field.htm
however the problem here is incorrect spacing. What you should have is:

{ IF{ =({ IF{ Mergefield Grade } = "A" 1 0 } + { IF{ Mergefield Grade } =
"B" 1 0 }) } = 1 "True" "False" }

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




Yang wrote:
Thanks for the reminder.. Yes, I'm using CTRL+F9 to put the {}
and below is my code
{If {=({IF{MERGEFIELD Grade}="A" 1 0} + {IF{MERGEFIELD Grade}="B" 1
0})}=1 "True" "False"}

(I typed it since I cannot copy from Word)

Please help.
10s.

"Suzanne S. Barnhill" wrote:

At least not out of a text medium such as these newsgroups; you can
copy and paste fields within Word.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

"Graham Mayor" wrote in message
...
You haven't used CTRL+F9 for the field brackets {}. You cannot
simply copy and paste fields.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Yang wrote:
Actually I'm getting this error.
Error! Unknown op code for conditional.

Any idea?

"Graham Mayor" wrote:

See also 'Testing for a value in one of several fields' at
http://www.gmayor.com/formatting_word_fields.htm which shows a
method that is easier to manage when there are lots of choices to
consider.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




Doug Robbins - Word MVP wrote:
Use another If...then...Else in place of the negative response.

{ IF A = B "A equals B" { IF A = C "But A does equal C" "A does
not equal either B or C" } }


"Yang" wrote in message
...
How to use "OR" function in field code If else statement?