• Extension of Class NotesGroup

    By Raimund Gürtl 10 months ago

    If you need a unique list of Persons, add this Property to the NotesGroup Class

    %REM
    Property Get AllPersonMembersUnique
    Description: returns an unique array contain all persons of this group and all its subgroups
    %END REM
    Public Property Get AllPersonMembersUnique() As Variant
    Dim tmpArray As Variant
    Dim index As Integer
    Dim memberName As String
    Dim tmpGroup As NotesGroup
    tmpArray = Me.AllMembers
    tmpArray = ArrayUnique(tmpArray, 5) 'remove duplicate entries
    For index = 0 To UBound(tmpArray)
    memberName = tmpArray(index)
    Set tmpGroup = m_manager.GetGroup(memberName)
    If Not tmpGroup Is Nothing Then
    tmpArray(index) = “” 'remove group name from array
    End If
    Next
    tmpArray = FullTrim(tmpArray)
    AllPersonMembersUnique = tmpArray
    End Property