LOTUSSCRIPT/COM/OLE CLASSES
Function getOfficePhone( lname As String ) As String Dim session As New NotesSession Dim db As NotesDatabase Dim view As NotesView Dim doc As NotesDocument If session.IsOnServer Then ' use the Address Book on the same server as the script Set db = New NotesDatabase( "", "names.nsf" ) Else ' use the Address Book on server Recife Set db = New NotesDatabase( "Recife", "names.nsf" ) End If Set view = db.GetView( "People" ) Set doc = view.GetDocumentByKey( lname ) getOfficePhone = doc.OfficePhoneNumber( 0 ) End Function
See Also