LOTUSSCRIPT/COM/OLE CLASSES


Examples: GetProfileDocument method
This example gets the "Interest Profile" Profile document based on the current user and displays items from it.

Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim profileAuthors As NotesItem
Dim profileStrings As NotesItem
Dim stringAuthors As String
Dim stringStrings As String
Set db = session.CurrentDatabase
Set doc = db.GetProfileDocument("Interest Profile", _
session.UserName)
Set profileAuthors = doc.GetFirstItem("ProfileAuthors")
Set profileStrings = doc.GetFirstItem("ProfileStrings")
stringAuthors = ""
stringStrings = ""
Forall profileAuthor In profileAuthors.Values
 stringAuthors = stringAuthors & Chr(10) &profileAuthor
End Forall
Forall profileString In profileStrings.Values
 stringStrings = stringStrings & Chr(10) &profileString
End Forall
If stringAuthors = "" Then
 stringAuthors = "None"
Else
 stringAuthors = Right _
 (stringAuthors, Len(stringAuthors) - 1)
End If
If stringStrings = "" Then
 stringAuthors = "None"
Else
 stringStrings = Right _
 (stringStrings, Len(stringStrings) - 1)
End If
Messagebox stringAuthors,, "Profile authors"
Messagebox stringStrings,, "Profile strings"

See Also