Show the Member Count of a Distribution List

This script reveals how many member a given distribution list has.

Last modified: 2006/12/03 | Accessed: 55.417  | #37
◀ Previous sample Next sample ▶
ReplyAll ReplyAll
ReplyAll alerts you before unintentionally replying all, or if you are a confidential BCC recipient of the e-mail.

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.

tip  How to add macros to Outlook
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
    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
Determine the "identity" of your emails. Set with SAM the sender and the folder folder for sent items with the help of rules.
email  Send a message