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

</div>

Method

# Clipboard.AddRawData

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

<div class="warning">

<div class="title">

Warning

</div>

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

</div>

## Description

Copies the passed data to the Clipboard using the specified MacType or UTI.

## Notes

The *DataType* parameter supports both the older MacType and newer UTIs. If the *DataType* parameter is exactly 4 bytes then it is treated as a MacType for backwards compatibility. Otherwise it is treated as a UTI.

On Windows you can use the a special *DataType* called [HTML Clipboard Format](https://msdn.microsoft.com/en-us/library/aa767917(v=vs.85).aspx) to add or fetch HTML data from the clipboard\`.

## Sample code

The following code places the contents of TextArea1 on the Clipboard. It contains RTF text:

``` xojo
Var s As String
s = TextArea1.Text ' contains RTF

Var c As New Clipboard
c.AddRawData(s,"public.rtf") ' UTI
c.Close
```

## Compatibility

All project types on all supported operating systems.
