In certain instances the mail merge fails to execute the else part of a condition

I have a complex template, which for the purposes of this fault I manged to reduce down to the minimum and still contain the problem. The scenario is that based on a contion the document is to render one table if true and a different table if false (the condition is based on the field NBR_SUBS in the attached sample data which takes the values of 1 or greater than 1). The if condition is simple and tests for greater than one ( IF NBR_SUBS > 1). When the value is 2 the required table is rendered correctly - but when the value is 1 nothing is redendered and this is my problem. When I reverse the condition and code I do not have the issue and if I split the if statment into two (ie If NBR_SUBS = 1 and IF NBR_SUBS <> 1 again I do not have the problem. I would appreciate any comments as to what is causing the issue, I have tried various things without success.

I have a client base with alarge number of templates - that may also have this issue.

I have attached the cut down word template and the associated xml file.

Many Thanks

Tony Bradford

Hi Tony,


Thanks for your inquiry.

Perhaps you’re using an older version of Aspose.Words; as with Aspose.Words for .NET 13.2.0, I was unable to reproduce this issue on my side. I would suggest you please upgrade to the latest version of Aspose.Words i.e. 13.2.0. You can download it from the following link:
http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/default.aspx

I hope, this helps.

Best regards,