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

Free Support Forum - aspose.com

Subtracting one merge field from another

I am trying to subtract one merge field from another merge field with the following formula:

= {MERGEFIELD AS_KCLETTERLATE} - {MERGEFIELD FSACMISCFEES} \# $#,##0.00

but it is giveing me a syntax error.

Are you able to even subtract one mergefield from another?

Hi,


Thanks for your inquiry. You can use formula field in your template Word document as shown in attached document. You can then populate these merge fields with data by using the code like below:
Document doc = new Document(“C:\Temp\in.docx”);
doc.getMailMerge().execute(new String[]{“Total_ListPrice_Sum”, “Total_Discount”}, new String[]{“5”, “2”} );
doc.save(“C:\Temp\out.pdf”);
In case the problem still remains, please attach your input document you’re getting this problem with here for testing. We will investigate the issue on our end and provide you more information.

Best regards,