SafeDistItem object

 

SafeDistItem object exposes Outlook.DistListItem object properties and methods blocked by the security patch.

 

The example below outputs the number of members of each distribution list in the default Contacts folder:

set App = CreateObject("Outlook.Application")
set ContactsFolder = Application.Session.GetDefaultFolder(olFolderContacts)
set SafeDistList = CreateObject("Redemption.SafeDistList")
for each item in ContactsFolder.Items
  if TypeName(item) = "DistListItem" Then
    SafeDistList.Item = item
    Debug.Print SafeDistList.MemberCount
  End If
next

 


Derived from: SafeItem

The following properties and method are inherited from the SafeItem object:

 

Attachments, Auth, Key, Body, Fields, Item, Recipients, RTFBody, Sender, Version

CopyTo, GetIDsFromNames, Import, SaveAs, Send

 

Properties

Methods

 


Derived from: IDispatch


Properties


IsDirty
 
Returns TRUE if the Outlook object assigned to the Item property has unsaved changes.
 
 
MemberCount
 
Returns an integer indicating the number of members in a distribution list. Read-only.
 
 

Methods


AddMember(Recipient)

Adds the given Recipient object as a member of the distribution list.

 

 
AddMemberEx

Allows to add a one-off address to the distribution list

Name - string, the name of the member

Address- string, the address of the member

AddressType- string, the address type of the member, e.g. "SMTP"

 

 
AddMembers(Recipients)
Adds all members of the Recipients collection to the distribution list.
 
 
GetMember(Index)

Returns an AddressEntry object representing the member with the given index.

Index - integer, 1 through MemberCount.

  

 
RemoveMember(Recipient)
Removes the given Recipient object from the distribution list.
 
 
RemoveMemberEx(Index)
Removes the member with the given index from the distribution list.
 
 
RemoveMembers(Recipients)
Removes all members of the Recipients collection from the distribution list.