RDOMailboxDelegates object

 

RDOMailboxDelegates is a collection of RDOMailboxDelegate objects representing Exchange mailbox store delegates

 

Returned by:

RDOExchangeMailboxStore.Delegates

 

The example below outputs the names of all delegates of the Exchange mailboxes in the profile.

'enumerate delegates
skPrimaryExchangeMailbox = 3
skDelegateExchangeMailbox = 4
set Session = CreateObject("Redemption.RDOSession")
Session.MAPIOBJECT = Application.Session.MAPIOBJECT
'Delegates API uses EWS, so we need to provide credentials unless
'the currently logged user is the mailbox owner
Session.Credentials.Add "*.onmicrosoft.com""user@company.demo""MyPassword"
Session.Credentials.Add "*.outlook.com""user@company.demo""MyPassword"

Session.Credentials.Add "*.office365.com""user@company.demo""MyPassword"
set Store = Session.Stores.DefaultStore
if (Store.StoreKind <> skPrimaryExchangeMailbox) and (Store.StoreKind <> skDelegateExchangeMailbox) Then
    MsgBox "Delegates are only supported for the Exchange stores"
Else
    set Delegates = Store.Delegates
    for each Delegate in Delegates
        Debug.Print Delegate.User.Name
    next
End If

 

Properties

Methods

 


Derived from: IDispatch


Properties


Count Integer, read-only. The number of delegates in the collection.
 
DeliverMeetingRequests rdoDeliverMeetingRequests, read/write.  Specifies how/if the meeting requests are delivered to the delegates

dmrDelegatesOnly= 0
dmrDelegatesAndMe =1
dmrDelegatesAndSendInformationToMe = 2
dmrNoForward =3

 

Methods


Add(AddressEntry) Adds the specified RDOAddressEntry object as a delegate and returns an instance of the corresponding RDOMailboxDelegate object.

'add delegates
skPrimaryExchangeMailbox = 3
skDelegateExchangeMailbox = 4
dfpAuthor = 3
set Session = CreateObject("Redemption.RDOSession")
Session.MAPIOBJECT = Application.Session.MAPIOBJECT
Session.Credentials.Add "*.office365.com""user@company.demo""MyPassword"
Session.Credentials.Add "*.outlook.com""user@company.demo""MyPassword" set Store = Session.Stores.DefaultStore if (Store.StoreKind <> skPrimaryExchangeMailbox) and (Store.StoreKind <> skDelegateExchangeMailbox) Then   MsgBox "Delegates are only supported for the Exchange stores" Else   set ABDialog = Session.GetSelectNamesDialog   ABDialog.Caption = "Please select a delegate user"   ABDialog.ForceResolution = true   ABDialog.InitialAddressList = Session.Addressbook.GAL   ABDialog.AllowMultipleSelection = false   if ABDialog.Display(TrueThen     set Delegates = Store.Delegates     set Delegate = Delegates.Add(ABDialog.Recipients(1).AddressEntry)     Delegate.PermissionsInbox = dfpAuthor     Delegates.Save   End If End If
Item(Index) Returns the RDOMailboxDelegate object with the specified index (1 through Count).

 
Remove(Index) Removes the delegate with the specified index (1 through Count).
'delete delegates
skPrimaryExchangeMailbox = 3
skDelegateExchangeMailbox = 4
set Session = CreateObject("Redemption.RDOSession")
Session.MAPIOBJECT = Application.Session.MAPIOBJECT
Session.Credentials.Add "*.onmicrosoft.com""user@company.demo""MyPassword"
Session.Credentials.Add "*.outlook.com""user@company.demo""MyPassword" set Store = Session.Stores.DefaultStore if (Store.StoreKind <> skPrimaryExchangeMailbox) and (Store.StoreKind <> skDelegateExchangeMailbox) Then   MsgBox "Delegates are only supported for the Exchange stores" Else   set Delegates = Store.Delegates   for i = Delegates.Count to 1 step -1     Delegates.Remove(i)   next   Delegates.Save End If
Save Saves the mailbox delegate information. This method must be called if any modifications to the delegate objects were made.
see examples above.