Designing Mail Merge Data Source

Hi,
I have this requirement to do mail merge.
My template has simple merge fields and regions.

Template.Doc:

//Simple Merge Fields
Name :
Address :
City :

//Regions
TableStart:Fees
Fee Type :
Fee Amount :
</TableEnd:Fees>

//Templates that repeat
Additionally, some of the templates will have <>, which means the above section will repeat.

How do I design a data source that will work in all the three cases.
I found that MailMergeDataSource allows to have child data sources.
But I couldn’t find a sample that has child data sources.

Please advice.

Thanks!


Hi Sudheer,

I believe nested mail merge is what you are looking for. It will allow you to produce a mail merge based off your design above.

Here is a link to the nested mail merge article

http://www.aspose.com/documentation/.net-components/aspose.words-for-.net-and-java/howto-use-nested-mail-merge-regions.html

And here is a link to where you can download the sample archive, which includes the corresponding code to the example

http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/entry187174.aspx

If you need any further help, don’t hesitate to ask.

Thanks,

Thanks Adam.
I could derive my solution from the sample.