Clipboard$ (function)

Syntax

Clipboard$[()]

Description

Returns a String containing the contents of the Clipboard.

Comments

If the Clipboard doesn't contain text or the Clipboard is empty, then a zero-length string is returned.

Example

This example puts text on the Clipboard, displays it, clears the Clipboard, and displays the Clipboard again.

Const crlf = Chr$(13) + Chr$(10)

Sub Main()

  Clipboard$ "Hello out there!"
  MsgBox "The text in the Clipboard is:" & crlf & Clipboard$
  Clipboard.Clear
  MsgBox "The text in the Clipboard is:" & crlf & Clipboard$
End Sub

See Also

Clipboard$ (statement); Clipboard.GetText (method); Clipboard.SetText (method).

More information

C