Hi,
We are trying to merge some dynamic word docs that have fields of the format {If {MERGEFIELD XXXX} = 1 “Field XXXX equals 1” “Field XXXX is not equal 1”} in them.
It would appear that the MERGEFIELD XXXX is correctly merged however the if statement is not evaluated with the result that the text does not appear.
Is this structure supported in Aspose.Word for Java?
Thanks
Hi
Thanks for your inquiry. Unfortunately, IF fields evaluation is not yet supported by Aspose.Words. We are going to support this feature in .NET version of Aspose.Words in a month or two. In Java version of Aspose.Words this feature will be available a little bit later.
Currently, as a workaround you can try updating field in the document manually (Ctrl+A and F9) or using macro. See the following link to learn more.
https://support.microsoft.com/en-us/topic/the-filename-field-does-not-automatically-update-when-you-open-a-document-in-word-de2bfb95-d990-1ced-a618-5ac0a2ec1be4
Also, you can try removing conditional from the template, you can move conditional logic to SQL query or to code.
Best regards.
The issues you have found earlier (filed as 37) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(3)