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

Free Support Forum - aspose.com

Subtracting two mergefield values

Following on from this post that tells us to use SUM() rather than simply use the + operator to add two mergefield values together, what is the approach for subtracting?

<A href="https://forum.aspose.com/t/69715</A></P> <P>Many thanks</P> <P>Mike</P>

Hi Mike,

Thanks for your inquiry. Please find attached couple of input/output documents here with this post and try executing the following code to be able to subtract two merge field values:

Document doc = new Document(MyDir

doc.MailMerge.CleanupOptions = Aspose.Words.MailMerging.MailMergeCleanupOptions.RemoveContainingFields;


new string[] { "X", "Y" },

new object[] { "5", "3" });

doc.Save(MyDir + @“out.docx”);

I hope, this helps.

Best regards,