Inserting paragraph break in table cell


I trying to replace text ‘ENTR’ to ParagraphBreak in entire document. Works fine for PDF, doesn’t for DOC: ‘ENTR’ is removed, but ParagraphBreak does not appear. Lib version 17.8, doc files in attachment. Is it bug?

using Aspose.Words;

using Aspose.Words.Replacing;
using Aspose.Words.Saving;

namespace WordSimple
    class Program
        static void Main(string[] args)
            License lic = new License();

            Document doc = new Document("test.doc");

            doc.Range.Replace("ENTR", ControlChar.ParagraphBreak, new FindReplaceOptions() { MatchCase = true, FindWholeWordsOnly = false });

            doc.Save("out.pdf", SaveOptions.CreateSaveOptions(SaveFormat.Pdf));
} (24.1 KB)



Thanks for your inquiry. We have tested the scenario and noticed the reported issue. So we have logged a ticket WORDSNET-15762 in our issue tracking system for further investigation and rectification. We will notify you as soon as it is resolved.

We are sorry for the inconvenience.



Thanks for your patience. We have investigated the issue and would like to suggest you to use meta-characters as following.

&p - paragraph break
&b - section break
&m - page break
&l - manual line break

doc.Range.Replace("ENTR", "&p", new FindReplaceOptions() {MatchCase = true, FindWholeWordsOnly = false});