I am trying to programmatically evaluate IF fields in word documents.
I need to mimick in my app Word's handling of IF fields.
There's a point that I can't understand : the following statement:
{ IF {DOCPROPERTY "something"} > 0 "true" "false"}
returns true if the document property "something" is set to
"dgskljsgdkl" or whatever non-numeric, alphabetic string.
However. it returns false if document property "something" is set to
"[gdslkjgsdsjdg", because of the trailing [.
Standard .net string comparison says "[gsdgdlkj" is greater that "0",
so I don't understand what rules Words uses to make the test.
In ascii table, [ comes after "0", so I was expecting a "false"
output.
Does anyone have an idea which set of comparison rules I should use to
reproduce Word behaviour on comparing strings, and strings to numbers?
Thanks,
Pascal.