SetText Property (AClipboard)

Puts a text string on the Clipboard object using the specified Clipboard object format.

Syntax

Clipboard.SetText(sText [, enFormat ] )

The SetText method syntax has the following parts:

 

Name

Type

Description

Clipboard

AClipboard

The system clipboard internal variable

sText

String

Text string to be set to the clipboard

enFormat

enumAClipboardFormat

Optional. An integer that specifies the Clipboard object text string format.

Where

enumAClipboardFormat:

 

Name

Value

Description

acfText

1

Text string

acfBitmap

2

Bitmap picture (N/A for this method)

acfMetafile

3

Metafile picture (N/A for this method)

acfDIB

8

Device-independent bitmap picture (N/A for this method)

acfPalette

9

Pallete (N/A for this method)

acfEnhMetafile

14

Enhanced metafile picture (N/A for this method)

acfDDELink

0xBF00

DDE Conversation Information text string

acfRTF

0xBF01

Rich text format text string

acfIcon

0xBF02

Icon picture (N/A for this method)

Comments

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

Example

The following statement sets the clipboard with the edit control selection (copy command) :

Clipboard.SetText(edt.SelText)

Applies to

AClipboard

See Also

Clipboard, GetFormat, SetPicture