Free Support Forum -

Mail Merge & Carriage Return in word


we experienced the same problem after upgrading from Aspose.words 9.5 to 11.4. For our document composition system it is no solution to remove empty paragraphs.

Is there a fix for it available, or are the affected Aspose releases known? Going back to 9.5 is not our favorite solution, since table layout problems have improved now with the 11.4 release.


Hi Peter,

Thanks for your inquiry. In your case, please use the MailMergeCleanupOptions. MailMergeCleanupOptions specifies options that determine what items are removed during mail merge. Please use the latest version of Aspose.Words for .NET.

Please check the following code snippet for your kind reference and let us know if you have any more queries.

<span lang=“EN-GB” style=“font-family:“Courier New”;color:#2B91AF;mso-no-proof:yes”>Document<span lang=“EN-GB” style=“font-family:“Courier New”;mso-no-proof:yes”> doc = new Document(MyDir

  • “in.docx”);<o:p></o:p>


doc.MailMerge.CleanupOptions |= Aspose.Words.Reporting.MailMergeCleanupOptions.RemoveEmptyParagraphs;

doc.MailMerge.CleanupOptions |= Aspose.Words.Reporting.MailMergeCleanupOptions.RemoveUnusedRegions;

doc.MailMerge.CleanupOptions |= Aspose.Words.Reporting.MailMergeCleanupOptions.RemoveUnusedFields;

doc.MailMerge.CleanupOptions |= Aspose.Words.Reporting.MailMergeCleanupOptions.RemoveContainingFields;