We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

IF Conditional fields

I was wondering if there was any progress on the handling of the IF fields in word docs? I asked this question earlier this year and was told it was going to be implemented this year. This is a definite need as we have close to 2000 templates that contain an IF condition.
Example: IF “” = “” “empty” “not empty”

Hi Shawn.

I faced the same issue and I have written some code that does this work (it handles IF, DOCPROPERTY and INCLUDETEXT fields, it would be quite straightforward to add MAILMERGE field support), parsing Runs and FieldStart/FieldEnd inside the document.

It is not production grade code yet, but if you want to try to implement it by yourself it may be useful.

If you’re interested send me a private message with your email and I’ll forward the code.


Thanks for your request. Unfortunately, Aspose.Words does not evaluate IF fields yet.
Also see the following link.
Best regards.

Is it possible you could share that code with me also? Thank you in advance. nraimond@hotmail.com