Hi there everybody,
I’m cannot find how to insert Line Breaks with the .Replace() method of the Document.Range class.
For example, I have a .dot model document containing the string “\n” several times. I open it with the following code:
Dim doc As Aspose.Words.Document = New Aspose.Words.Document(“MyDoc.dot”)
Then as said I wish to replace the “\n” instances by a Line Break:
Thanks for your inquiry. Could you please attach your input document here for testing? I will check the problems on my side and provide you more information.
Thank you for additional information. Please try using the following code:
Dim doc As New Document(“sample_aspose.dot”)
doc.Range.Replace("\n", ControlChar.LineBreak, False, False)
doc.Save(“out.doc”)