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();
lic.SetLicense("aspose.total.lic");
Document doc = new Document("test.doc");
doc.Range.Replace("ENTR", ControlChar.ParagraphBreak, new FindReplaceOptions() { MatchCase = true, FindWholeWordsOnly = false });
doc.Save("out.doc");
doc.Save("out.pdf", SaveOptions.CreateSaveOptions(SaveFormat.Pdf));
}
}
}
Release.zip (24.1 KB)