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?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityYou 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" ≠ "" ...
NUMPAGES
, ie { IF { NUMPAGES } <> { NUMPAGES } "A" "B" }
Jun 22, 2015 at 12:55