Jaa


ITextRange.Copy Method

Definition

Copies the text of the text range to the Clipboard.

public:
 void Copy();
void Copy();
public void Copy();
function copy()
Public Sub Copy ()

Remarks

Note

On Windows Phone, this method throws an exception. Programmatic access to the clipboard is not supported on Windows Phone.

The ITextRange.Cut, Copy, and Paste methods let you perform the usual cut, copy, and paste operations on a text range. The clipboard formats that are typically supported include CF_TEXT and CF_RTF. You can also use private clipboard formats to access text in custom formats.

To copy and replace plain text, you can use the ITextRange.GetText and SetText methods. To copy formatted text from one range to another without using the Clipboard, you can use the Copy and Paste methods along with the FormattedText property. For example:

textRange2.FormattedText = textRange1.FormattedText;

Applies to

See also