How to paste a styled text in rtf

Hi,
I have a styled text zone.

If I manually copy and paste in text edit, I get a styled text in rtf with colors and styles.

But if I do it by programming, like
<code 4D>
$ptr:=OBJECT Get pointer(Object named;“txt”)
SET TEXT TO PASTEBOARD($ptr->)

</code 4D>

I get plain text like :
color_bkg 255

I tried this
<code 4D>
CLEAR PASTEBOARD
$ptr:=OBJECT Get pointer(Object named;“txt”)
TEXT TO BLOB($ptr->;$blob;UTF8 text without length)
APPEND DATA TO PASTEBOARD(“com.apple.rtf”;$blob)

</code 4D>

but it do not work.
Any help ?

Ca me style mon texte quand je copie mon exemple !!!
Je re-essaie :

opacity 100
colors_mins 43033

das ist ein Feature von http://livedoc.4d.com/4D-Write-Pro-Handbuch-16-R3/4D-Write-Pro-Programmiersprache/WP-INSERT-DOCUMENT.301-3250611.de.html4D Write Pro>

Voten:

http://forums.4d.fr/Post/DE/16636504/1/16636505

Erledigt. Hat schon jemand einen workaround ohne Write Pro ?