How to remove empty paragraphs during mail merge using .NET | CleanupOptions

Hi

I'm experiencing a bit of a problem after my last Aspose Words.Net-Update. As recommended I tried to switch from the outdated "RemoveEmptyParagraphs" to the new CleanupOptions.

The thing is, that this doesn't work. My old code

doc.MailMerge.RemoveEmptyParagraphs = True

does the trick, while the new one

doc.MailMerge.CleanupOptions = MailMergeCleanupOptions.RemoveEmptyParagraphs
doc.MailMerge.CleanupOptions = MailMergeCleanupOptions.RemoveUnusedFields
doc.MailMerge.CleanupOptions = MailMergeCleanupOptions.RemoveContainingFields
doc.MailMerge.CleanupOptions = MailMergeCleanupOptions.RemoveUnusedRegions

doesn't work at all.
I tried this with a letter with an address-block wich can or cannot contain certain lines, or better, on every line there is a merge-field which might or might not contain content after the mail-merge.

Can anybody possibly help me with this?
I mean, the old approach still does work, but as there might come the day that it wont be supported anymore, I'd prefere to use the current approach.

Regards,
Andy

Hi Andy,

Thanks for your query. It would be great if you please share your document along with code for investigation purposes.