I have a field code with a strange behavior. When I put the code,
{ IF NUMPAGES=NUMPAGES "A" "B" }
I get A as expected however, when I reverse this, ie
{ IF NUMPAGES<>NUMPAGES "A" "B" }
I still get A.
Why is this happening?
I have a field code with a strange behavior. When I put the code,
{ IF NUMPAGES=NUMPAGES "A" "B" }
I get A as expected however, when I reverse this, ie
{ IF NUMPAGES<>NUMPAGES "A" "B" }
I still get A.
Why is this happening?
You need to say
{ IF NUMPAGES <> NUMPAGES "A" "B" }
Word Help: Field codes: IF field says,
Operator
Comparison operator. Insert a space before and after the operator.
⋮
I can't find this documented anywhere, but it looks like Word is interpreting your code as
IF "NUMPAGES<>NUMPAGES" ≠ "" ...