Copy Rich Text Item From One Document to Another

I have two documents(DocA and DocB). Each document has a Rich Text Field.

In DocA, the rich text field (Field A) contains a Doclink to a document residing in another database.

I wish write a script that copies the contents of the rich text Field (including the Doclink) from DocA to the rich text field in DocB. The Rick text field in DocB should also contain the Doclink.

I have been pulling my hair out over this one and can’t get it to work.

Help please!

Subject: Some sample doc

doc1 below has the link which is copied to doc2

Dim session As New NotesSession,db As NotesDatabase,linkItem As notesitem
Dim dc As NotesDocumentCollection,doc1 As NotesDocument, doc2 As NotesDocument
Set db = session.Currentdatabase
Set dc = db.Unprocesseddocuments
Set doc1 = dc.Getfirstdocument()
Set linkItem = doc1.getfirstitem(“Body”)
Set doc2 = dc.Getnextdocument(doc1)
Call doc2.copyitem(linkItem,“Body”)
doc2.save True,false

Subject: Thankyou

Thank you so much!