Insert richtext in to another richtext

HI!I have a RichText1 from Form1, and i have a RichText2 from Form2, how copy to RichText1 in RichText2.

if RichText1 have a Table and imagen.

I am using this code, but the images and pictures are deleted:

Dim Form1 As notesdocument

Dim Adjunto As NotesRichTextItem

Dim Form2 As notesdocument

Set Adjunto = Form1.GetFirstItem(“RichText1”)

Set Adjunto = Form2.GetFirstItem(“RichText2”)

Form1.RichText1 = Adjunto.Text

Subject: Insert richtext in to another richtext

you should use the AppendRTItem method of NotesRichTextItem to copy a richtext item into another

Subject: Insert richtext in to another richtext

If you want to make RichText2 the same as RichText1, then something like this should work:

Form2.RichText2 = Form1.RichText1

If you want to add what is in RichText1 to what may already be in RichText2, then use AppendRTItem as mentioned before.

Cheers,

Adrian

Subject: RE: Insert richtext in to another richtext

For RTF i am not even sure this method would work.

If it is for a full copy, i’d either use the copyfieldtodocument or I would use the new constructor.

Can someone confirm if the

Form2.RichText2 = Form1.RichText1

works?

Subject: Insert richtext in to another richtext

Hello Luis,

You cannot copy a rich text field the same way you’d copy any item.

Try using “RenderToRTItem” in order to copy a while document into a rich text item.

hth

Nicolas Abesdris