View Single Post
  #7   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default Multiple conditions in merge

As far as I know, the double quotes are only required around a string that
includes spaces, such as

"The amount is between 50 and 100."

but their use around the individual parts (true part, false part) of the
result will not cause a problem.

Such field constructions can be copied and pasted. The important thing is
that the field delimiters {} must be inserted by the use of Ctrl+F9. The
similar looking characters inserted by the use of the keys on the keyboard
will not work. If the field codes disappear, use Alt+F9 to toggle on their
display.

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

"Stephen Green" wrote in message
...
I"ve tried Doug's code and it works. I don't know if the extra quote
would enhance or detract form the efficacy (I haven't tried).

While we're on the subject, does each Merge Condition have to be typed or
can I cut and paste, the edit them.

So far I have had trouble ceeping track of the Conditions as they have a
tendency to disappear from view...

Stephen


"Stephen Green" wrote in message
...
Thanks, Guys!

I see one difference between your suggestions. There is a double quote
before the second { IF in Graham's suggestion (below) which is missing in
Doug's.

Is this important?

Stephen

"Graham Mayor" wrote in message
...
Oops - a typo - that should read
{ IF { Mergefield Amount } = 50 "{ IF { Mergefield Amount } = 100 "The
amount is between 50 and 100" "" }" "" }
Spaces are important!

--

Graham Mayor - Word MVP

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


Graham Mayor wrote:
{ IF { Mergefield Amount } = 50 "{ IF { Mergefield Amount } =100
"The amount is between 50 and 100" "" }" "" }


Stephen Green wrote:
I can't for the life of me figure out how to insert a field base on
multiple conditions. What I'd like to do, for instance, is something
like this:
If Amount = 50 And Amount =100 Then "The amount is between 50 and
100"
Can anyone help?

Stephen