I am sure this may be pretty easy, but having not programed in a while, I am drawing a blank. The below script navigates a RTF and returns the document ids of each doclink found. All I need is to create a list of the document ids for all of the doclinks found in the RTF. The code gets the ids, however, I am drawing a blank as to how to create the list.
Dim session As NotesSession
Dim db As NotesDatabase
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument
Dim rti As NotesRichTextItem
Dim rtnav As NotesRichTextNavigator
Dim rtlink As NotesRichTextDocLink
Dim Item As NotesItem
Dim Item2 As NotesItem
Dim UNID As Variant
Set session = New NotesSession
Set db = session.CurrentDatabase
Set dc = db.UnprocessedDocuments
Set doc = dc.GetFirstDocument
Set rti = doc.GetFirstItem("CaseComments")
Set rtnav = rti.CreateNavigator
Set rtlink = rtnav.GetFirstElement(RTELEM_TYPE_DOCLINK)
If rtlink Is Nothing Then
Set item = doc.ReplaceItemValue( "DocLinkIDs","No doclinks in Case Comments Field" )
Call doc.Save(True,True)
Exit Sub
End If
While Not(rtlink Is Nothing)
UNID = rtlink.DocUnID
Set Item2 = doc.AppendItemValue("DocLinkIDs",UNID)
Set rtlink = rtnav.GetNextElement
Wend
Call doc.Save(True,True)
THANKS!