![get plain text get plain text](http://media.logitheque.com/download/500x350/gestion-du-presse-papier/12e9442c-get-plain-text.jpg)
' The Text property on a TextRange object returns a string It instantly removes everything unneeded: colours, typeface size, style (for example, boldface/italics), hyper-links, images, etc. ' TextPointer to the end of content in the RichTextBox.ĭim textRange As New TextRange(, ) Get Plain Text is a practical utility program to process text within Mac OS: It converts copied text into plain text. ' TextPointer to the start of content in the RichTextBox. Private Function StringFromRichTextBox(ByVal rtb As RichTextBox) As String representing the plain text content of the TextRange. The Text property on a TextRange object returns a string TextPointer to the end of content in the RichTextBox. TextPointer to the start of content in the RichTextBox. string StringFromRichTextBox(RichTextBox rtb) TextRange provides a Text property, which returns the plain text portions of the TextRange as a string. ContentStart and ContentEnd properties each return a TextPointer, and are accessible on the underlying FlowDocument that represents the contents of the RichTextBox. The method creates a new TextRange from the contents of the RichTextBox, using the ContentStart and ContentEnd to indicate the range of the contents to extract. The following code implements a method that takes a RichTextBox as an argument, and returns a string representing the plain text contents of the RichTextBox. Ĭode example with RichTextBox as an argument In the Read as Plain Text section, check the Read all standard mail in plain text to disable received messages from being viewed as HTML and view email in plain text only.
![get plain text get plain text](https://fthmb.tqn.com/9qh2nG1zDp3pANhTzCsF2vCzorI=/1024x1024/filters:fill(auto,1)/14433301244_8a03dedf10_o-Daniel-Stark-Bauhaus--56a288dc5f9b58b7d0cbdde4.jpg)
The following Extensible Application Markup Language (XAML) code describes a named RichTextBox control with simple content.
#Get plain text how to#
This example shows how to extract the contents of a RichTextBox as plain text.