I have this requirement to do mail merge.
My template has simple merge fields and regions.
//Simple Merge Fields
Fee Type :
Fee Amount :
//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.
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
And here is a link to where you can download the sample archive, which includes the corresponding code to the example
If you need any further help, don’t hesitate to ask.
I could derive my solution from the sample.