Field Code: IF statements do not render after merge using Aspose.Word

During my evalution of the Aspose.Word component I ran into 2 issues. This dll could be a wonderfull solution if I can get past these issues.

The first issue involves “Field Code: IF” statements that are in a template document. These statements do not render correctly on the Aspose.Word merged document. Upon toggling these field codes, in the new doc, it shows the merge data inside of the formula but does not process it.
(We have about 1100 of these Word mailmerge templates in existence, and most of them have at least one merge formula field, so eliminating these statements is not practical)

The second issue is that preceding some Numbering and Bullets there are some random characters that are being inserted into the document.

I have attached a sample template document. Page 2 has three of these “IF statement” merge fields that fail to render.

Thanks for any help, outside of these issues this product is a great fit for our needs.

Hi,

Thank you for your report, we will reply to you as soon as resolve these issues.

The random characters are part of the evaluation version watermark.

Please note that Aspose.Word does not calculate fields so if you expect Aspose.Word to take some action depending on IF fields or calculate their results - it will not happen.

We will look into the question about fields in details however as it seems you are reporting some other problem, not the question about field calculation.

Ok, I can confirm that what you get with merge fields is the current Aspose.Word behaviour “by design”.

If you merge field is inside another field, then when the merge field is filled by Aspose.Word, the new value does not get propagated up the formula because Aspose.Word does not evaluate the field values.

We will implement field evaluation in the future, sorry, cannot say when at the moment.

Hello, I think you’ve done an awesome job with this product. We’ve been happy or have found workarounds for most of our required functionality.
Unfortunately, 90% of our clients use conditional formatting or conditional page layout in their templates. Do you know of any competing products that might have the IF FIELD feature? Thank you so much.

Sorry I cant recommend other products. We will support IF in the end.

Hi,
I have been evaluating Aspose.Words. It’s a really neat product, and much, much faster than using Word Automation. However, the issue I currently have is that Word supports far more features in Word documents. For example, Word fields are not supported in Aspose.Words.
Can you give me an update on when Fields are likely to be supported? This is key to my development, and therefore my choice of product
Many thanks

Thank you for your interest in Aspose.Words. Most fields are actually supported in Aspose.Words. Some are not supported, for example IF fields evaluation. The reason for this is that in most cases IF fields logic can be moved to application code which gives you greater flexibility and ease of support and development. People who don’t have legacy of templates containing IF fields are much better off writing the document processing logic in C#.
The second reason is the complexity of implementing this feature.
Nevertheless, it is in our plans to add IF field evaluation support. The approximate timeframe is 3-4 months from now.

Just wondering if this feature has been implemented in the current version. If not, are there any workarounds?

I am afraid we won’t be able to get to this feature before the end of the year. IF fields are currently just preserved in the document. No evaluation is done. The only workaround is to rework templates removing IF fields and implementing the similar document manipultion logic in application code.
Best regards,

Hi,
Please can you tell me if the IF field functionality has been added yet? If not, can you provide me with an update on when this will be addressed, or potential ways to workaround the problem. I am trying to use IF in conjunction with MERGEFIELD, so as to be able to say “if mergefield=x then insert additional text”
Thanks

Up !

Hi,

I need this functionality too. Is it possible now in Aspose.word ?

Thanks

Hi
Thank you for your interest in Aspose.Words. Unfortunately this feature is not available yet. Please see FAQ for more information.
Best regards.

I need to use the IF statements, can anyone please tell me whether Aspose now supports the IF statements or not. If not, when they are planning to include this.

Hi Mansi,
Thanks for your inquiry.
Sure, Aspose.Words for .NET fully supports the updating of IF fields. Please see the article here for details. You can download the latest version from here.
If you have any further queries please feel free to ask.
Thanks,