The
IF field in Word is case-sensitive. You need the field braces inserted by Word (not typed).
See Paul Edstein (macropod)'s answer here for the exact construction you need:
https://answers.microsoft.com/en-us/...6-0f75eb57279e
This is also shown in the portion of my page on fields at:
StyleRef fields.