I have multiple datatables returned as part of a dataset, which is the input for my Aspose word merge.
Depending on the records I pull, some of the tables might return 0 records.
The way, my code is structured is to fist populate document data using doc.MailMerge.Execute method to populate regular (non-region) data.
I then loop through each data table and populate regions using doc.MailMerge.ExecuteWithRegions method.
I am using RemoveUnusedRegions cleanup option to remove empty regions.
However, once I hit a table with 0 records and the cleanup option is set, none of the subsequent regions (TableStart — TableEnd) get populated even if they have records present.