LOTUSSCRIPT/COM/OLE CLASSES


Examples: NotesAdministrationProcess class
This example prompts the current user for the hierarchical name of a user. Based on the organization name of the name supplied, it then selects the certifier file to use to rename the user. Finally, it submits an administration request to remove the middle initial from the specified user name.

Sub Initialize
 Dim session As New NotesSession
 Dim adminp As NotesAdministrationProcess
 Dim ws As New NotesUIWorkspace
 Dim certFile As String
 Dim userName As Variant
 Dim posOfFirst As Long
 Set adminp = _
 session.CreateAdministrationProcess("myServer/northeast")
 userName = ws.Prompt(PROMPT_OKCANCELEDIT, _
 "User to rename", _
 "Enter the hierarchical name of the user name you want _
  to change")
 Forall group In session.UserGroupNameList
   oName$ = group.Organization
 End Forall
 posOfFirst = Instr(userName, oName$)
 If posOfFirst <> 0 Then
   adminp.CertifierFile = _
   "C:\lotus\domino\data\cert.id"
 Else
   adminp.CertifierFile = _
   "C:\lotus\notes\data\software-cert.id"
 End If
 adminp.CertifierPassword = _
 ws.Prompt(PROMPT_PASSWORD, _
 "Password", "Type certifier password")
 noteid$ = adminp.RenameNotesUser(userName,"*","*","")
 If noteid$<> "" Then
   Messagebox "Request submitted",,"Success"
 End If
End Sub

See Also