Hi Aspose support
We have one problem with using your great library. In case when IF expressions are using MERGEFIELD also as result part of expression, it does not give expected result. Here is example:
[Case 1: ] Direct euro
{ IF { MERGEFIELD "comp_service_oms_nw"} <> "" €}
[Case 2: ] From expression without quotes around merge field
{ IF { MERGEFIELD "comp_service_oms_nw"} <> "" { MERGEFIELD "comp_service_oms_nw"}}
[Case 3: ] From expression with quotes around merge field
{ IF { MERGEFIELD "comp_service_oms_nw"} <> "" "{ MERGEFIELD "comp_service_oms_nw"}"}
If we run mail merge, and we supply € as result for comp_service_oms_nw variable we get this output:
[Case 1: ] Direct euro
€
[Case 2: ] From expression without quotes around merge field
[Case 3: ] From expression with quotes around merge field
€
In case that we select area where field for Case 2 is, right click and execute UpdateFields in word context menu, it would show € for case 2 as expected.
We have a lot of those template in production with syntax from case 2 in use. It is not an option to fix those templates. Before we started to use Aspose.Words, mail merge was done at client browser using activeX, and there it worked (cases as Case 2 would render € without need to any user intervention). Now we are generated Word documents using Aspose.Words on server side, and deliver generated documents to users, but as shown - result is not same as it was.
Is there any ‘workaround’ that would allow us to detect such cases on the fly, and fix it somehow? We discovered that we can execute updateFields in Aspose just before we save word document, that fixes this case, but unfortunately creates different problems (we get Error! Unknown op code for conditional.) in other templates.
If it is possible, we need some help urgent.
Best regards,
Vladimir