versuche es mal hiermit; simuliert ein @NameLookup
Sub Click(Source As Button)
Dim Ausgabe As String
Ausgabe = LookUpUser("comm1", "Heinz Ulrich Krause/witte/de","OfficePhoneNumber")
Msgbox ausgabe
End Sub
Function LookupUser( server As String, key As String, retfield As String) As String
On Error Goto DoError
Dim ws As New NotesUIWorkSpace
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
server = session.GetEnvironmentString("MailServer", True)
Set db = session.GetDatabase(server, "names.nsf")
Set view = db.GetView("($VIMPeople)")
Set doc = view.GetDocumentbyKey(key, True)
tmp = doc.GetItemValue(retfield)
LookupUser = tmp(0)
Exit Function
DoError:
If doc Is Nothing Then
LookupUser = "User " & key & " not found."
Exit Function
End If
End Function
Ulrich