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”)
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.