Nein, Bernhard, sollte auch lokal funzen. Aber trotzdem danke für Dein Angebot :D
Trotzdem würde mich interessieren, wie Du das auf einem Server umsetzen würdest.
Eigentlich hab ich ja auch schon die Lösung, nur die rekursive Auflösung der Gruppen hab ich noch nicht implementiert.
Ah ja, hier bisherige die Umsetzung in kürze:
intCount = 0
Set aclentry = acl.GetFirstEntry
While Not aclentry Is Nothing
If aclentry.IsRoleEnabled(strRole) Then
Redim Preserve vElemArray(intCount)
vElemArray(intCount) = aclentry.Name
intCount = intCount + 1
End If
Set aclentry = acl.GetNextEntry(aclentry)
Wend
Bei Ulrich's Script stört mich ein wenig die fixe Vorgabe der DB, also:
Dim db As New NotesDatabase("Servernamet", "Names.NSF")
Na ja, erste Überlegung:
dbAddressBooksArray = session.AddressBooks 'db array of all address books
Forall loop_db In dbAddressBooksArray
If ( loop_db.IsPublicAddressBook ) Then
'Public Address Book found !
Set dbNAB = loop_db
Exit Forall
End If
End Forall
If (dbNAB Is Nothing) Then
'we did not find any book
Error 1001, "A public address book could not be found !"
End If
Allerdings hab ich da wenig Erfahrung im Bezug auf NAB-Zugriff, also ob das reicht und was ich da noch an ErrorHandling einbauen müsste.
Matthias, mal so ein Schnellschuss-Codeschnipsel:
NABs = session.AddressBooks
Forall b In NABs
If Not b Is Nothing Then
Call b.Open( "", "" )
If b.IsOpen Then
Set NABview = b.GetView ("($Networks)" ) 'this is a view only in public addressbooks!
If Not (NABview Is Nothing) Then 'do not process private address books!
Set NABview = b.GetView ("($NamesFieldLookup)")
If Not (NABview Is Nothing) Then 'strange - in a public NAB this view should exist, but ... don't process this case
Set NABdoc = NABview.GetDocumentByKey (GroupName, True)
If Not (NABDoc Is Nothing) Then 'we found a matching document!
If NABdoc.Type (0) = "Person" Then 'we found a person doc!
GetNABGroupMembers = NABdoc.Owner
Exit Function
End If
If NABdoc.Type (0) = "Group" Then 'we found a group!
GetNABGroupMembers = NABdoc.Members
Exit Function
End If
End If
End If 'of "($NamesFieldLookup) don't exist"
End If 'of "($Networks) don't exist"
End If
End If
End Forall
Nur ganz fix 'rauskopiert. Dem Algorithmus ist es vollkommen egal, ob das lokal oder auf dem Server läuft.
Morgen ahbe ich bestimmt wieder mehr Zeit ;)
Bernhard