Empty(Null) Merge Field value

Hi,
I wonder how can I skip the Merge Field to be rendered in case the value is null (or empty String).
What I do currently during in my IMailMergeDataSource implementation once I get the empty result I replace it with empty String, e.g “”. But this sort of work around changes the desired layout of the document by introducing undesired empty areas/lines.

I am using Java version.

Please advise.
Thanks
Michael

Hi

Thanks for your inquiry. I think, in your case, you can try using MailMerge.RemoveEmptyParagraphs option to remove empty paragraphs during mail merge process. See the following link for more information:
https://reference.aspose.com/words/net/aspose.words.mailmerging/mailmerge/cleanupoptions/
Please let me know if you need more assistance, I will be glad to help you.
Best regards,