Visual Basic Reference

Visual Studio 6.0

SetText Method

See Also    Example    Applies To

Puts a text string on the Clipboard object using the specified Clipboard object format. Doesn't support named arguments.


object.SetText data, format

The SetText method syntax has these parts:

Part Description
object Required. An object expression that evaluates to an object in the Applies To list.
data Required. String data to be placed onto the Clipboard.
Format Optional. A constant or value that specifies one of the Clipboard formats recognized by Visual Basic, as described in Settings.


The settings for format are:

Constant Value Description
vbCFLink &HBF00 DDE conversation information
vbCFRTF &HBF01 RichText Format
vbCFText 1 (Default) Text


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