Richtext Import To Another Rich Text Field

How to add data from a Rich Text Field into another rich text field.

Requires a dialog box and a form with stored data in a rich text field
Dim w As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim session As New NotesSession
Dim thisDB As NotesDatabase
Dim view As NotesView
Dim docA As NotesDocument
Dim docB As NotesDocument

Dim rtitemA As Variant
Dim rtitemB As Variant
Dim text As NotesItem

Set uidoc = w.CurrentDocument
Set docA = uidoc.Document
Set thisDB = session.CurrentDatabase

Set view = thisDB.GetView( "Templates" )
Call w.dialogbox("TemplateDialog", True, True, True, True, False, False)

Set docB = view.GetDocumentByKey(docA.TemplateList(0))

Set rtitemA = docA.GetFirstItem( "Body" )
Set rtitemB = docB.GetFirstItem( "TemplateInfo" )

Call rtitemA.AddNewLine(1)
Call rtitemA.AppendRTItem( rtitemB )

Call docA.Save(True, True)
docA.SaveOptions = "0"

Set uidoc=w.editDocument(False)
Set uidoc=w.editDocument(True)

Dig Deeper on Domino Resources

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...