Create Document with MailMerge DataSource

I need to create a word document that is linked to an excel spreadsheet datasource. This doc will be saved and subsequently opened by a user in Word where they will need to be able to select merge fields from the Mailings/Insert Merge Fields button in word. Once they have added their merge fields they will save the document and another process will pick up the saved doc and programmatically perform a mail merge

Could someone point me in direction of an example of how to create a document with an excel datasource

Hi,


Thanks for your inquiry. In your case, you need to use both Aspose.Cells and Aspose.Words components. You can export Worksheets to DataTable and use the exported DataTable as datasource in Mail Merge.

Exporting Data from Worksheets

In your case, please use Mail Merge with Regions. I suggest you please read following documentation links for your kind reference.
http://www.aspose.com/docs/display/wordsnet/Mail+Merge+with+Regions+Explained
http://www.aspose.com/docs/display/wordsnet/How+to++Execute+Mail+Merge+with+Regions

Please let us know if you have any more queries.