例: FindUserInDomain method

次のエージェントは、「Motorcycle Guy」というユーザーの出現をすべて検索する要求を入力します。

Sub Initialize
  Dim session As New NotesSession 
  Dim adminp As NotesAdministrationProcess
  Set adminp = _
  session.CreateAdministrationProcess("Software_Server") 
  adminp.CertifierFile = _
  "c:¥lotus¥notes¥data¥software-cert.id" 
  Dim ws As New NotesUIWorkspace
  adminp.CertifierPassword = _
  ws.Prompt(PROMPT_PASSWORD, "Password", _
  "Type certifier password.")
  noteid$ = adminp.FindUserInDomain("Motorcycle Guy")
  If noteid$ <> "" Then
    Dim db As New NotesDatabase("Software_Server", "admin4")
    Call ws.EditDocument(False, db.GetDocumentByID(noteid$))
  End If
End Sub