Free Support Forum -

Empty(Null) Merge Field value


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.


<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

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:

Please let me know if you need more assistance, I will be glad to help you.

Best regards,