Getting unformatted text from RichEdit

Steve picture Steve · Nov 30, 2011 · Viewed 9.4k times · Source

I have a Richedit that allows my users to format and view error messages that display within my application.

I now need to be able to export the text only (no formatting) out to another database that their trouble-ticket system uses.

I have tried all the combinations of PlainText I can think of and I always still get the rtf formatting.

How can I get the text only?

Answer

Andreas Rejbrand picture Andreas Rejbrand · Nov 30, 2011

To obtain the unformatted text, simply use RichEdit1.Text.