Reputation: 13
I am distributing some variables from excel to word. Now, I would like to put a conditional formatting in some fields. The normal situation that is working fine is this field:
{DOCVARIABLE AB*MERGEFORMAT}
Now, I want to apply condition to AB. For example, if AB < 1 it is highlighted as green and if it is AB>1 it highlighted as red. I tried different variations, but all of them was wrong. For example, 2 of them are these:
1- {If {DOCVARIABLE AB*MERGEFORMAT}> "1" {DOCVARIABLE AB*MERGEFORMAT} {DOCVARIABLE AB*MERGEFORMAT}}
2- {If <<DOCVARIABLE AB*MERGEFORMAT>> > "1" {DOCVARIABLE AB*MERGEFORMAT} {DOCVARIABLE AB*MERGEFORMAT}}
And I am highlighting the middle part as red and the last part as green. But it gives me the error that the operation is unknown, so the if function is not written in a proper way.
Upvotes: 0
Views: 4439
Reputation: 7850
Although conditional formatting does not exist in Word it is possible to approximate it for very simple conditions. For further information see the documentation for IF field
Upvotes: 2