Hi there!
I’m trying to delete a group of users automatically using a LotusScript agent invoked in the Actions menu of the Notes client. These users are in our secondary address book. It works when I delete dummy accounts from the main address book, but it can’t find the users in the secondary address book. I get the message “Notes error: User name not found in Domino Directory”.
Any ideas? Here is my code:
Sub Initialize
Dim session As New NotesSession
Dim db As New NotesDatabase("","")
Dim GroupView As NotesView
Dim GroupDoc As NotesDocument
Dim ws As NotesUIWorkspace
Dim adminp As NotesAdministrationProcess
Dim userName As Variant
Dim i As Integer
db.Open "ServerName","glnames.nsf"
Set GroupView=db.GetView("Groups")
Set GroupDoc=GroupView.GetDocumentByKey("GL_LA9999")
Set adminp = session.CreateAdministrationProcess("ServerName")
For i = 1 To Ubound(GroupDoc.Members)
userName = GroupDoc.Members(i)
Call adminp.DeleteUser(userName, True, MAILFILE_DELETE_HOME, "")
Next
End Sub
Thanks!
Gérald