Free Support Forum - aspose.com

Delete table after empty mail merge

I could use some direction in identifying the best way to handle this situation. I have a table with a MailMerge named range (a single row in the table) and if the mail merge didn’t produce any output I can easily clear out the empty range, but I also want to remove the parent table and subsequent paragraph after the table. Any best practices for doing this?

Hi Keith,


Thanks for your inquiry. A universal solution would be to use RemoveUnusedRegions as This instructs the mail merge engine to remove any regions which are not merged with any data.
http://www.aspose.com/docs/display/wordsnet/How+to++Remove+Unmerged+Regions+from+a+Document

Best Regards,

I was headed down that direction, so thanks for the confirmation.

Hi Keith,


Please let us know any time you have any further queries. We’re always glad to help you.

Best Regards,