Follow

Using Aspose for memo fields

Issue:

Line breaks like "\n" or "\r" are not supported by Aspose. The following exception will be thrown, if a user uses them, e.g. in a memo field:

"The replace string cannot contain special or break characters"

 

Resolution:

Therefore, it is necessary to replace these characters:

string textToReplace = txtInput.Text.Replace("\r\n", Aspose.Words.ControlChar.LineBreak);

doc.Range.Replace("oldValue", textToReplace, true, false);

 




0 Comments

Please sign in to leave a comment.
Powered by Zendesk