RichEditControl.Copy() Method
Copies the content of the selection to the Clipboard.
Namespace: DevExpress.XtraRichEdit
Assembly: DevExpress.XtraRichEdit.v22.2.dll
NuGet Package: DevExpress.Win.RichEdit
Declaration
Example
The following code finds all occurrences of the “text from RichEditControl” phrase using the SubDocument.FindAll method, selects and copies them.
richEditControl.Text = "Open any text editor (Notepad, Word) and press the 'Ctrl+V' shortcut, the 'text from RichEditControl' string will be pasted into the editor's document";
DocumentRange[] foundRanges = richEditControl.Document.FindAll("text from RichEditControl", SearchOptions.None);
richEditControl.Document.Selection = foundRanges[0];
richEditControl.Copy();
See Also