User Tools

Site Tools

blog:2021-02-05_c_copy_formatted_content_from_a_richtextbox



2021-02-05 C#: Copy Formatted Content From a RichTextBox

  • We would like to copy formatted content from RichTextBox and patest to word file.
  • The solution as follows:

Solution

  • if (richTextBox1.Text.Length > 0)
    {
        // Copy the formatted content to the clipboard
        Clipboard.SetText(richTextBox1.Rtf, TextDataFormat.Rtf);
    }

TAGS

  • 221 person(s) visited this page until now.

Permalink blog/2021-02-05_c_copy_formatted_content_from_a_richtextbox.txt · Last modified: 2021/02/05 14:55 by jethro

oeffentlich