<div class="meta" robots="noindex">

</div>

Method

# Clipboard.SetText

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2019r2. Please use `Clipboard.Text<clipboard.text>` as a replacement.

</div>

## Description

Sets the Clipboard to the text passed.

## Sample code

This code is in the Action event of a button. It puts the text in a `TextField</api/deprecated/textfield>` on the Clipboard.

``` xojo
Dim c As Clipboard

' create a new instance of the clipboard
c = New Clipboard

' set the text
c.SetText(TextField1.Text)

' close it
c.Close
```

## Compatibility

All project types on all supported operating systems.
