RDOStore object |
RDOStore object represents a generic message store. Depending on the actual kind of the store (see StoreKind property below), the following methods will return store objects with extra properties and methods. E.g. RDOPstStore implements all the properties and methods of the RDOStore object plus implements an extra property specific to a PST store - PstPath.
See RDOPstStore, RDOStore2, RDOExchangeStore, RDOExchangeMailboxStore, RDOExchangePublicFoldersStore objects below.
Returned by:
RDOStores: Item, AddPSTStore, AddDelegateExchangeMailBoxStore, FindExchangePublicFoldersStore, GetSharedMailbox, GetStoreFromID
RDOSession.GetStoreFromID
RDOFolder.Store
RDOMail.Store
RDOIMAPAccount.Store
RDOHTTPAccount.Store
The example below logs to the default MAPI session and prints out the file names of the PST stores and Server Distinguished Name for the Exchange stores
set Session =
CreateObject("Redemption.RDOSession") |
Derived from: _MAPIProp - |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
_MAPIProp methods and properties: GetIDsFromNames, Fields(), GetPropList, GetNamesFromIDs, CopyTo, Save, MAPIOBJECT, Session |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
StoreKind |
Returns an enumeration representing the message store kind StoreKind - TxStoreKind: skUnknown = 0; |
set Session =
CreateObject("Redemption.RDOSession") NumPstStores = 0 MsgBox "You have " & NumPstStores & " PST stores in the profile" |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Default |
boolean, read-write. Returns true if the store is default in the given profile. Set to true to make the store default |
set Session =
CreateObject("Redemption.RDOSession") |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RootFolder |
Returns RDOFolder object representing the root folder of the message store. Note that this folder is not visible to a user |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
IPMRootFolder |
Returns RDOFolder object representing the top visible folder of the message store. |
set Session =
CreateObject("Redemption.RDOSession") |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
SearchRootFolder |
Returns RDOFolder object representing the top search folder of the message store. |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
EntryID |
string, read-only. Returns the entry id of the store |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Name |
string, read-write. Reads/sets the name of the store. |
set Session =
CreateObject("Redemption.RDOSession") MsgBox Store.Name |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Reminders |
Returns RDOReminders object representing the reminders collection for a given store. |
'snooze all active reminders for 2 minutes |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
StoreAccount |
returns RDOAccount object corresponding to the Outlook account associated with the store. Read-only. Outlook 2002 and up only. |
set Session =
CreateObject("Redemption.RDOSession") |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Methods |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GetDefaultFolder(FolderType) |
FolderType - integer. The type of default folder to return. Accepts the same values as Namespace.GetDefaultFolder method in Outlook Object Model (olFolderInbox, olFolderContacts, etc). Returns RDOFolder object. Note that unlike RDOSession.GetDefaultStore or RDOStores.GetDefaultStore, which return default folders from the default store, this method returns the default folder from a given store, which does not have to be the default store. E.g. if you open a delegate Exchange mailbox, this method will return the default folder of the mailbox owner. This also applies to multiple PST stores, if they have the default folder structure set up. |
set Session =
CreateObject("Redemption.RDOSession") |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
AbortSubmit(MessageEntryID) |
Aborts message submission for a given message. MessageEntryID - string. The entry id of a message marked for submission. |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CompareEntryIDs(EntryID1, EntryID2) |
Checks whether the two entry ids refer to the same MAPI object. Note that entry ids cannot be directly compared and multiple entry ids can refer to the same object (e.g. in case of long term vs. short term entry id). EntryID1 - string, entry id of the first object EntryID2 - string, entry id of the second object |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GetMessageFromID(EntryIDMessage, Flags) |
EntryIDMessage - string representing the entry id of the message Flags - (optional). integer flags to be used to call IMAPISession::OpenEntry. By default MAPI_BEST_ACCESS (0x10) is used. This parameter is most useful if you need to bypass the cached mode in Outlook 2003. E.g. passing MAPI_NO_CACHE (0x200) + MAPI_BEST_ACCESS (0x10) will open the message in the best access mode bypassing the cached store. Returns RDOMail object. |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GetFolderFromID(EntryIDFolder, Flags) |
EntryIDFolder - string representing the entry id of the folder Flags - (optional). integer flags to be used to call IMAPISession::OpenEntry. By default MAPI_BEST_ACCESS (0x10) is used. This parameter is most useful if you need to bypass the cached mode in Outlook 2003. E.g. passing MAPI_NO_CACHE (0x200) + MAPI_BEST_ACCESS (0x10) will open the folder in the best access mode bypassing the cached store. Returns RDOFolder object. |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Remove |
Removes the given store from the profile. |
set Session =
CreateObject("Redemption.RDOSession") |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
RDOStore2 object |
This object represents an extension of the RDOStore interface and introduces one extra property: Searches (see below).
This interface can be used for any store (RDOExchangeStore, RDOExchangeMailboxStore, RDOExchangePublicFoldersStore)
Derived from: RDOStore |
||
|
||
implements all RDOStore properties and methods |
||
|
||
Properties |
||
|
||
Categories
|
returns RDOCategories collection representing categories from the given store Only Outlook 2007 (or higher) stores categories list in the default store.
|
set Session =
CreateObject("Redemption.RDOSession")
|
Searches |
RDOSearches, read-only.
Returns RDOSearchescollection that provides access to the Outlook Search Folders.
|
set Session =
CreateObject("Redemption.RDOSession")
|
|
RDOPstStore object |
This object represents PST (either ANSI or Unicode) message store. Implements all RDOStore properties and methods and exposes an additional property: PstPath. This object is returned by the various RDO methods if StoreKind property is either skPstAnsi or skPstUnicode.
Derived from: RDOStore |
||
|
||
implements all RDOStore properties and methods |
||
|
||
Properties |
||
|
||
PstPath |
String. Returns a fully qualified path to the given PST store
Important note: if you set RDOSession.MAPIOBJECT property to Namespace.MAPIOBJECT property from the Outlook Object Model and your code is running outside of the outlook.exe address space (i.e. it is not a COM add-in) this property will return an error due to a MAPI bug. |
set Session =
CreateObject("Redemption.RDOSession") |
Methods |
||
|
||
|
||
GetNicknames |
Returns RDONickNames collection representing nicknames stored in the store.
|
|
ValidateIPMTree |
Validates and creates (if necessary) the following default folders in the PST store
Inbox Outbox Deleted Items Sent Items Contacts Drafts Journal Notes Tasks Junk E-mail Folder Views Common Views Search Root IPM Subtree
|
set Session = CreateObject("Redemption.RDOSession") 'open or create a new PST
store 'now create a new contact in the default Contacts folder of the newly created PST store set Contact =
Store.GetDefaultFolder(olFolderContacts).Items.Add |
|
RDOExchangeStore object |
This object represents an Exchange message store. RDOExchangeMailboxStore and RDOExchangePublicFoldersStore are derived from this interface. Implements all RDOStore properties and methods and exposes an additional property: ServerDN.
Derived from: RDOStore |
||
|
||
implements all RDOStore properties and methods |
||
|
||
Properties |
||
|
||
ServerDN |
String. Returns an Exchange Server distinguished name |
set Session =
CreateObject("Redemption.RDOSession") |
|
RDOExchangeMailboxStore object |
This object represents an Exchange Server mailbox message store. Implements all RDOExchangeStore properties and methods and exposes an additional property: Owner. This object is returned by the various RDO methods if StoreKind property is either skPrimaryExchangeMailbox or skDelegateExchangeMailbox.
Derived from: RDOExchangeStore |
||
|
||
implements all RDOExchangeStore properties and methods |
||
|
||
Properties |
||
|
||
CalendarOptions |
Returns RDOCalendarOptions object that represents the calendaring options (auto-accept, free/busy data, etc). Read-only.
|
set Session =
CreateObject("Redemption.RDOSession")
|
IsCached |
Boolean. read/write. Outlook 2003 and up only. Returns true if the Exchange mailbox is cached. Note that delegate mailboxes are never cached. Setting this property won't take effect until the next time MAPI logs to the profile. Corresponds to the "Use Cached Exchange Mode" checkbox in the Exchange provider properties dialog. |
|
JunkEmailOptions |
Returns RDOJunkEmailOptions object representing mailbox Junk E-mail options. Note that mailbox Junk E-mail options can be different from the profile-wide options: mailbox Junk E-mail options can be retrieved or set for a mailbox other than the primary mailbox in the profile (see the example)
|
'make sure messages from a client are never marked as spam
set Session = CreateObject("Redemption.RDOSession")
|
OstPath |
String, read only. Returns full path to the local OST file used to cache the mailbox. |
|
Owner |
AddressEntry. Returns an Address Book object that represents the owner of the mailbox |
set Session =
CreateObject("Redemption.RDOSession") |
OutOfOfficeAssistant |
Returns an RDOOutOfOfficeAssistant object that allows to set the Out-Of-Office state and reply text. |
skPrimaryExchangeMailbox = 3 |
Rules |
RDORules, read-only. Returns a collection representing rules defined for the given mailbox. |
set Session = CreateObject("Redemption.RDOSession") |
|
||
Methods |
||
|
||
GetFolderFromSourceKey(SourceKey) |
Returns a folder (RDOFolder) object corresponding to the given source key (PR_SOURCE_KEY). SourceKey - the value of the PR_SOURCE_KEY. Either a variant array of bytes as returned by RDOFolder.Fields() or a string with a hex representation of PR_SOURCE_KEY.
Normally folders can be reopened using RDOSession.GetFolderFromID or RDOStore.GetFolderFromID, but under Exchange the values of entry ids can differ depending on how the object is opened (e.g. whether it comes from the primary Exchange mailbox or a delegate mailbox, etc). The value of PR_SOURCE_KEY for a given folder or message is always the same. GetFolderFromSourceKey and GetMessageFromSourceKey allow to retrieve folders and messages when, for example, the folder or a message is retrieved by one user, stored in an external DB and then ubsequently retrieved in another user's context.
This method only works in the online mode: the profile used in RDOSession.Logon must either be configured to be in the online mode or RDOSession.LogonExchangeMailbox must be used.
|
PR_SOURCE_KEY = &H65E00102 skPublicFolders = 5
|
GetMessageFromSourceKey(FolderSourceKey, MessageSourceKey) |
Returns a message (RDOMail, RDOContactItem, etc depending on the message class) object corresponding to the given source key (PR_SOURCE_KEY). FolderSourceKey - the value of the parent folder's PR_SOURCE_KEY property. Either a variant array of bytes as returned by RDOFolder.Fields() or a string with a hex representation of PR_SOURCE_KEY.
MessageSourceKey - the value of the message PR_SOURCE_KEY property. Either a variant array of bytes as returned by RDOFolder.Fields() or a string with a hex representation of PR_SOURCE_KEY.
See GetFolderFromSourceKey above.
|
|
GetNicknames |
Returns
RDONickNames collection representing
nicknames stored in the store.
|
|
|
RDOExchangePublicFoldersStore object |
This object represents an Exchange Server mailbox message store. Implements all RDOExchangeStore properties and methods. There are no additional properties at this time. This object is returned by the various RDO methods if StoreKind property is skPublicFolders.
Derived from: RDOExchangeStore |
||
|
||
implements all RDOExchangeStore properties and methods |
||
|
||
Properties |
||
|
||
IsCached |
Boolean. read/write. Outlook 2003 and up only. Returns true if the Exchange mailbox is cached. Note that delegate mailboxes are never cached. Setting this property won't take effect until the next time MAPI logs to the profile. Corresponds to the "Download Public Folder Favorites" checkbox in the Exchange provider properties dialog. |
|
|
||
Methods |
||
|
||
GetFolderFromSourceKey(SourceKey)
|
See RDOExchangeMailboxStore.GetFolderFromSourceKey above
|
|
GetMessageFromSourceKey(FolderSourceKey, MessageSourceKey)
|
See RDOExchangeMailboxStore.GetMessageFromSourceKey above
|
|