We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Remove empty image paragraph


When doing mail merge of images, I noticed that the cleanup option MailMergeCleanupOptions.REMOVE_EMPTY_PARAGRAPHS does not seem to remove the paragraph for image fields.

I would like that, if the image field is alone on the paragraph, and it is not merged, the whole paragraph is removed.

How can I achieve this?


Thanks for your inquiry. Please attach the following resources here for testing:

  • Your input Word document.
  • Please attach the output Word file that shows the undesired behavior.
  • Please create a simple Java application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we’ll start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.