I am putting and IF ... THEN field into a merge document
where the code is
{IF {MERGEFIELD "MyMergeField" } <"-5" "I am true" "I am
false"}
If the MyMergeField = -30 I get the result I am true.
If the MyMergeField = 0 I get the result I am false.
If the MyMergeField = 5 I get the result I am false.
So far so good.
If the MyMergeField = -3 I get the result I am true.
Since I am testing to see whether the value is less than -
5 the result should be I am false.
Anyone have any ideas why this is happening and how I can
fix it?
Thanks,
Jonathan
Jonathan,
Try putting your Mergefield in a formula field:
{If { = { Mergefield "MyMergeField" } } < -5 "I am
true" "I am false"
>-----Original Message-----
>I am putting and IF ... THEN field into a merge document
[quoted text clipped - 20 lines]
>
>.
Hi Jonathan,
As Doug says, for Word, everything is text. It also doesn't
help with numeric comparisons if you put something ins
"quotes"! You'll generally have better luck leaving the
quotes away if you want to do "number stuff". In this case,
however, that doesn't help. BUT...
{ IF { Ref Test2 } < 0 "{ IF { = Abs({ Ref Test2 }) } > 5
"True" "False" }" "False" }
> I am putting and IF ... THEN field into a merge document
> where the code is
[quoted text clipped - 14 lines]
> Anyone have any ideas why this is happening and how I can
> fix it?
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jan
24 2003)
http://www.mvps.org/word
This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:-)
Greg Maxey - 28 Sep 2003 13:26 GMT
Cindy,
Thank you, thank you, thank you. I have been frustrated over this one.
Particularily the lack of documentation official or unofficial.

Signature
Greg Maxey
A peer in "peer to peer" support
Rockledge, FL
Remove the obvious (wham...m) to reply in e-mail
Cindy Meister -WordMVP- wrote:
> Hi Jonathan,
>
[quoted text clipped - 35 lines]
> follow question or reply in the newsgroup and not by e-mail
> :-)
Peter Jamieson - 28 Sep 2003 19:22 GMT
If you want to do
IF { a } < { b }
you can also consider
{ IF { ={ a }-{ b } } < 0 "True" False" }
(AFAIK it only works because all numbers less than 0 start with a "-", which
is lower in the collation sequence). Probably not much use if you also need
to detect small rounding errors.
--
Peter Jamieson
MS Word MVP
> Cindy,
>
[quoted text clipped - 47 lines]
> > follow question or reply in the newsgroup and not by e-mail
> > :-)