Programming with Reflection

image\rwnprg32.gif GetClipboardText method


Syntax Text = object.GetClipboardText



Returns the text that is currently stored in the Windows Clipboard.

For example, this command displays the current Clipboard contents in a message box:

MsgBox Session.GetClipboardText


Text Return type: String
The current Clipboard text. An empty string is returned if the Clipboard is empty or if it contains something other than text, such as a bitmap. Use the SetClipboardText method to copy text to the Clipboard.

Note: Because this method returns a value but does not take any arguments, some OLE clients generate an error when you try to use this method. If this happens, try appending parentheses to the end of the command. For example:

clipText = myobject.GetClipboardText( )


image\jump.gif Example

image\jump.gif Keyword Index

image\popup.gif Related Topics

image\popup.gif Reflection products that use this command