Skip to main content

RTFTOPLAINTEXT

Returns plain text from a rich text string.

Syntax

string RTFTOPLAINTEXT(string richtext)

Example

To change the string "This is some bold text" into plain text:

RTFTOPLAINTEXT("{\\rtf1\\ansi{\\fonttbl\f0\fswiss Helvetica;}\\f0\\pard This is some {\\b bold} text.\\par}")

Will return "This is some bold text".

You can use this function to convert a column containing HTML code to plain text so that it can be added to a different system. For example, if you had a column titled Body and this contained HTML you could use:

RFTTOPLAINTEXT(Body)

To return the HTML in each row as plain text.