Applies to
TPlusToHtml, TPlusToRtf components
Declaration
procedure CopyToClipboard;
Description
This method copies the selection to the clipboard, in html or rtf format. It does nothing if no text is selected in the PlusMemo component.
It is possible to have the clipboard contain multiple formats for the same text, by calling Clipboard.Open before CopyToClipboard, followed by Clipboard.Close. For example, the code below will put the normal text format, the html format and the rtf format of the selected text, all simultaneously held by the clipboard:
Clipboard.Open;
PlusMemo1.CopyToClipboard;
PlusToHtml1.CopyToClipboard;
PlusToRtf1.CopyToClipboard;
Clipboard.Close;
An application that pastes the clipboard content will normally select the format that is most appropriate for itself, among those contained in the clipboard. In the above example, Word will select the rtf format, Outlook Express the html format, and Notepad the text format.