Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
You can create different regions in your template to have special areas that you can simply fill with your data. Use the Mail Merge with regions if you want to insert tables, rows with repeating data to make your documents dynamically grow by specifying those regions within your template.
You can create nested (child) regions as well as merge regions. The main advantage of using this type is to dynamically increase parts inside a document. See more details in the next article “Nested Mail Merge with Regions”.
A Mail Merge region is a specific part inside a document that has a start point and an end point. Both points are represented as Mail Merge fields that have specific names “TableStart:XXX” and “TableEnd:XXX”. All content that is included in a Mail Merge region will automatically be repeated for every record in the data source.
Aspose.Words allows you to execute Mail Merge with regions using one of the ExecuteWithRegions methods that accept IMailMergeDataSource custom data source.
The following code example shows how to execute Mail Merge with regions from sqlite database with SQLiteCpp:
You can notice the difference between the document before executing Mail Merge with regions:
And after executing Mail Merge with regions:
There are some important points that you need to consider when performing a Mail Merge with regions:
If one of these rules is broken, you will get unexpected results or an exception may be thrown.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.