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

Free Support Forum - aspose.com

Different Values in a single document

This code executes once in a document.

new string[] { "MyName", "MyTitle", "MyAddress1", "MyAddress2" },
new object[] { "James Bond", "Secret Agent", "MI5 Headquarters", "Milbank, London" });

In the following way we can view different values in a document.

DataTable customers = ExecuteDataTable("SELECT TOP 5 * FROM AsposeWordCustomers WHERE Country = 'USA'");

My problem is I need to view several customers in a single document but the customer list will not directly come from database.
You keep the Database column name and document mergefield name same but my mergefield name and database column name is different. How can I solve this problem??
Is it possible to execute it doc.MailMerge.Execute several times…???

Thanks for your interest in Aspose products. I think that you can try to map between names of fields in your data source and names of mail merge fields in the document. See the following link for more information.
I hope that this will help you.
Please let me know if this will not help you or if you would like to know something else.
Best regards.