Visual Basic Reference

Visual Studio 6.0

GetText Method

See Also    Example    Applies To

Returns a text string from the Clipboard object. Doesn't support named arguments.


object.GetText (format)

The GetText method syntax has these parts:

Part Description
object Required. An object expression that evaluates to an object in the Applies To list.
format Optional. A value or constant that specifies the Clipboard object format, as described in Settings.  Parentheses must enclose the constant or value.


The settings for format are:

Constant Value Description
vbCFLink &HBF00 DDE conversation information
vbCFText 1 (Default) Text
vbCFRTF &HBF01 Rich Text Format (.rtf file)


These constants are listed in the Visual Basic (VB) object library in the Object Browser.

If no text string on the Clipboard object matches the expected format, a zero-length string ("") is returned.