LOTUSSCRIPT/COM/OLE CLASSES


Examples: ServerHint property
This agent displays the server of the database of the first or only doclink in the Body item of the current document.

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

Sub Initialize
 Set session = New NotesSession
 Set db = session.CurrentDatabase
 Set dc = db.UnprocessedDocuments
 Set doc = dc.GetFirstDocument
 Set rti = doc.GetFirstItem("Body")
 Set rtnav = rti.CreateNavigator
 If Not rtnav.FindFirstElement(RTELEM_TYPE_DOCLINK) Then
   Messagebox "No doclinks in Body item",, "No doclinks"
   Exit Sub
 End If
 Set rtlink = rtnav.GetElement
 If rtlink.ServerHint = "" Then
   Messagebox "Doclink is on a local database",, "Doclink server"
 Else
   Messagebox "Doclink is on " & rtlink.ServerHint,, "Doclink server"
 End If
End Sub

See Also