Urgent - How to mail merge a table into a document?

We are using Aspose.Words to take client *.doc templates, merge the medical data in to the fields, and convert it to PDF. Generally speaking, this is working fine. We used to do all this “by hand”, creating a new *.doc in memory and adding fields as required.

The problem I’m having is that one of the fields I need to populate during the merge, I need to insert a table of data. I can’t figure out how to make this work.

First I tried creating an HTML table, hoping that Word would “figure it out and convert it”, but it is inserting the text verbatim, so all I see is "<table><tr><td>some data...</td>" etc.

Then I tried creating a Word “table” object in memory, and posting that as the field to insert. Maybe I’m doing it wrong, but it just inserts some text describing the Object, not the table and data itself.

Can this be done? How?

Hi

Thanks for your request. You should use MergeFieldEvenHandler to achieve this. Please see the following link for more information.
https://reference.aspose.com/words/net/aspose.words.mailmerging/ifieldmergingcallback/
Best regards.