|
Reporter
|
VBOffice Reporter is an easy to use tool for data analysis and reporting in Outlook. A single click, for instance, allows you to see the number of hours planned for meetings the next month. |
A distribution list's member count is limited. But how do you know how many members are already on a list? The following lines of code will tell you.
Public Sub ShowMemberCount()
Dim obj As Object
Dim DL As Outlook.DistListItem
If TypeOf Application.ActiveWindow Is Outlook.Explorer Then
If Application.ActiveExplorer.Selection.Count Then
Set obj = Application.ActiveExplorer.Selection(1)
End If
Else
Set obj = Application.ActiveInspector.CurrentItem
End If
If Not obj Is Nothing Then
If TypeOf obj Is Outlook.DistListItem Then
Set DL = obj
MsgBox "Name: " & DL.DLName & _
vbCrLf & "Member: " & DL.MemberCount, _
, "Member Count"
End If
End If
End Sub