HiI have profile document name template have two rich text field. I want to detached the files from the rich text fields and attach it to the client info document into two different rich text fields into the same database.
Thanks’Lisa
HiI have profile document name template have two rich text field. I want to detached the files from the rich text fields and attach it to the client info document into two different rich text fields into the same database.
Thanks’Lisa
Subject: Detach files from multiple rich text fields from template form and attahed it to Client info form which also multiple fields.
I don’t think you need to detach and re-attach them, just copy the items.
Dim s as New NotesSession
Dim db as NOtesDatabase
Dim profileDoc as NotesDocument
Dim newDoc as NotesDocument
Dim rtItem as NOtesRichTextITem
Set db=s.CurrentDatabase
set newDoc=db.CreateDocument
Set profileDoc=db.GetProfileDocument(“YourProfile”)
Set rtItem=profileDoc.GetFirstItem(“Field1”)
Call rtItem.CopyItemToDocument(newDoc,“NewFieldName1”)
Set rtItem=profileDoc.GetFirstItem(“Field2”)
Call rtItem.CopyItemToDocument(newDoc,“NewFieldName2”)
newDoc.Form=“formName”
Call newDoc.Save(True,False)
I think that should do it
Cheers
Tim