I have a table that is being populated with data from a datatable using the MailMerge.ExecuteWithRegions function along with TableStart and TableEnd markers. It is working perfectly when I have data, but I have instances where the datatable will be empty. Current behavior seems to be that if the datatable is empty, ExecuteWithRegions will leave the “placeholder” table intact with merge fields still present.
Ideally, I would like an option similar to “RemoveEmptyParagraphs” where by setting “RemoveEmptyDataRegions” to true, it will completely remove that table. Or maybe simply that row.
I just can’t have the merge fields remaining in my resulting document when I have 0 rows of data.
Can this be implemented quickly? I have a need for it immediately. I am preparing a product mock-up to convince my company to buy Aspose.