Free Support Forum -

Range.Replace Special Characters

I am working with the Document.Range.Replace (Find, Replace, MatchCase, ?).

This function is working great.

But, unfortunately, it throws an error with some text I pull from the database. Reading the documentation, it says it does not allow special characters in the NewString value. Okay, this is great, I can filter my input string to trim off the bad characters.

But, alas, what are the actual values of the special characters? Is there a one to one relationship between ASCII values? What are the translations?

Thanks so much for your help,


Here is a complete list of characters that cannot be inserted:


Just to clarify the above a little more.

The API reference says: An exception is thrown if a captured or replacement string contain one or more special characters: paragraph break, cell break, section break, field start, field separator, field end, inline picture, drawing object, footnote.

The constants for all control characters are defined in the ControlChar class