RDOFolder object |
RDOFolder object represents a MAPI folder with its messages and subfolders. For the search folders (Kind property is fkSearch), RDOFolder object can be cast to the RDOSearchFolder object, which provides methods and properties specific to the MAPI search folders.
Note that RDOSearchFolder object (representing search folders) is derived from RDOFolder object.
To represent functionality specific to the regular (not search) folders, RDO exposes RDOFolder2 interface, which is only implemented by the regular folders. To access RDOFolder2 properties and methods, cast RDOFolder object to RDOFolder2 object.
Returned by:
RDOSession.GetDefaultFolder, GetFolderFromID, GetSharedDefaultFolder
RDOStores.GetDefaultFolder, GetSharedDefaultFolder
RDOStore.RootFolder, IPMRootFolder, GetDefaultFolder, SearchRootFolder, GetFolderFromID
RDOFolders.Add, Item, GetFirst, GetLast, GetNext, GetPrevious
RDOMail.Parent (for messages that exist in folder, not for the embedded message attachments)
The example below logs to the default MAPI session and displays the number of messages in the Inbox folder:
set Session =
CreateObject("Redemption.RDOSession") |
Derived from: _MAPIProp - |
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
_MAPIProp methods and properties: GetIDsFromNames, Fields(), GetPropList, GetNamesFromIDs, CopyTo, Save, MAPIOBJECT, Session
|
||||||||||||||||||||||||||
CopyTo(DestObj) |
Copies the folder to the target folder. RDOFolder overrides the behavior inherited from _MAPIProp to copy all messages and subfolders. DestObj parameter must point to an instance of the RDOFolder object. |
'copy the entire IPM subtree of the default store to a new PST file
set Session = CreateObject("Redemption.RDOSession") |
||||||||||||||||||||||||
|
||||||||||||||||||||||||||
Properties |
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
ACL |
Returns RDOACL object representing the Access Control List for the folder. Exchange specific, returns NULL for other store kinds.
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 marshalling bug.
|
'print out the names of all ACL entries for each ACE in Folder.ACL |
||||||||||||||||||||||||
DefaultMessageClass |
string, read-only. The default message class of the newly created messages, e.g. "IPM.Note"
|
|
||||||||||||||||||||||||
Description |
string, read-write. Folder description; corresponds to the PR_COMMENT Extended MAPI property.
|
|
||||||||||||||||||||||||
EntryID |
string, read-only. Hex representation of the folder entry id.
|
|
||||||||||||||||||||||||
ExchangeSynchronizer |
RDOFolderSynchronizer, read-only. Allows to synchronize the folder contents (both regular and associated items) and subfolders. See RDOFolderSynchronizer for help.
|
|
||||||||||||||||||||||||
FolderKind |
Returns one of the rdoFolderKind enumeration constants indicating the folder type. Corresponds to the PR_FOLDER_TYPE Extended MAPI property. If FolderKind is fkSearch, you can cast the folder to the RDOSearchFolder object. Otherwise you cab cast it to the RDOFolder2 object. fkRoot (0)
|
|||||||||||||||||||||||||
Name |
string, read-write. Folder name; corresponds to the PR_DISPLAY_NAME Extended MAPI property.
|
|
||||||||||||||||||||||||
Parent |
RDOFolder, read-only. The parent folder of the given folder.
|
|
||||||||||||||||||||||||
StoreID |
string, read-only. Hex representation of the folder's parent store entry id.
|
|
||||||||||||||||||||||||
UnReadItemCount |
integer, read-only. The number of unread items in the folder
|
|
||||||||||||||||||||||||
Items |
RDOItems, read-only. Collection representing the folder's messages
|
set Session =
CreateObject("Redemption.RDOSession") |
||||||||||||||||||||||||
Folders |
RDOFolders, read-only. Collection representing the folder's subfolders.
|
set Session =
CreateObject("Redemption.RDOSession") |
||||||||||||||||||||||||
HiddenItems |
RDOItems, read-only. Collection representing the folder's hidden (associated) messages |
set Session =
CreateObject("Redemption.RDOSession") |
||||||||||||||||||||||||
Store |
RDOStore, read-only. Folder's parent message store.
|
|
||||||||||||||||||||||||
ShowAsOutlookAB |
boolean, read-write. Returns or sets a Boolean variable that specifies whether the folder will be displayed as a Microsoft Outlook Address Book. Only applies to the folders containing contacts or distribution lists.
|
set Session =
CreateObject("Redemption.RDOSession") |
||||||||||||||||||||||||
DefaultItemType |
OlItemType, read-only. Returns an OlItemType constant (olContactItem, olMailItem, etc) indicating the default Outlook item type contained in the folder.
|
|
||||||||||||||||||||||||
WebViewAllowNavigation |
boolean, read-write. Determines if navigation is allowed if the folder displays a web page (WebView is true and WebViewURL points to a valid HTML page)
|
|
||||||||||||||||||||||||
WebViewOn |
boolean, read-write. Returns or sets a Boolean indicating the Web view state for a folder. True to display the Web page specified by the WebViewURL property
|
Folder.WebViewURL = "http://www.cnn.com" |
||||||||||||||||||||||||
WebViewURL |
string, read-write. Returns or sets a String indicating the URL of the Web page that is assigned to a folder.
|
|
||||||||||||||||||||||||
DeletedItems |
RDODeletedItems, read-only. Collection representing the folder's deleted messages that can be restored. Exchange only in the online mode, the retention policy must be set on the Server.
|
set Session =
CreateObject("Redemption.RDOSession") set DeletedItems = Inbox.DeletedItems Debug.Print "restoring " &
DeletedItems(i).Subject |
||||||||||||||||||||||||
AddressBookName |
string, read-write. Returns or sets a String that indicates the Address Book name for the MAPIFolder object representing a contact items folder
|
Folder.ShowAsOutlookAB = true |
||||||||||||||||||||||||
Methods |
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
Delete |
Deletes the folder and all of its messages and subfolders.
|
|
||||||||||||||||||||||||
MoveTo(DestinationFolder) |
Moves the folder to the specified destination folder. DestinationFolder parameter must point to an instance of the RDOFolder object.
|
|
||||||||||||||||||||||||
|
RDOFolder2 object |
RDOFolder2 object represents functionality specific to the regular MAPI folders, not available to the search folders. To access RDOFolder2 properties and methods, cast RDOFolder object to RDOFolder2 object.
RDOFolder2 is returned everywhere RDOFolder is returned if the folder is a regular folder (not a search folder).
The example below logs to the default MAPI profile, adds a new PST store, check whether a there is a default Calendar folder, and if not, creates one and sets it as default:
set Session =
CreateObject("Redemption.RDOSession") |
Derived from: RDOFolder |
||
|
||
Properties |
||
|
||
CustomViewOnly |
Boolean, read/write..
Determines which views are displayed on the View menu for a given folder.
|
|
DeletedFolders |
Returns the deleted (but recoverable) folders collection (RDODeletedFolders) from a given folder. Exchange only in the online mode, the retention policy must be set on the server. |
set Session =
CreateObject("Redemption.RDOSession")
|
ExchangeSynchronizer |
RDOFolderSynchronizer, read-only. Allows
to synchronize the folder contents (both regular and associated items) and
subfolders. See RDOFolderSynchronizerfor help. |
|
FolderFields |
RDOFolderFields, read-only. This property represents user properties defined in a particular folder. A folder-level user property is available in the "Field Chooser" in Outlook when you select "User-defined fields in folder" when customizing a view or designing a form. Note that adding a property to the folder fields does not automatically make it visible as one of the columns in the folder view nor does it add it to any of the Outlook objects (such as a message or the folder itself); FolderFields is merely a list of property definitions. Internally, folder fields are stored in one of the hidden messages with the message class of "IPC.MS.REN.USERFIELDS" in the PR_USERFIELDS property.
|
set FolderFields =
Folder.FolderFields
|
FolderPath |
string, read-only. Returns a string that indicates the path of the current folder.
|
|
IsInPFFavorites |
boolean, read-only. TRUE if the given folder is in the Favorites folder in the Public Folder store.
|
|
ShowItemCount |
Sets or returns a constant in the rdoShowItemCount enumeration that indicates whether to display the number of unread messages in the folder or the total number of items in the folder in the Navigation Pane. Read/write.
olNoItemCount = 0 |
|
|
||
Methods |
||
|
||
AddToPFFavorites |
Adds a Microsoft Exchange public folder to the public folder's Favorites folder.
|
|
EmptyFolder(DeleteHiddenMessages) |
Deletes all messages and subfolders from a folder without deleting the folder itself.
DeleteHiddenMessages - boolean, optional. If true, all hidden (associated) messages are also deleted. If the optional parameter is not specified, defaults to FALSE (hidden messages are not deleted).
|
|
FindPFFavoritesCopy |
Returns the folder's counterpart (RDOFolder2 object) added to the PF Favorites. If the folder is not in the Public Folder store or if the folder has not been added to PF Favorites, returns NULL. If called on a folder already in PF Favorites, the method returns itself.
Calling this method is more expensive than accessing the IsInPFFavorites property.
|
set FavFolder =
Folder.FindPFFavoritesCopy
|
GetActivitiesForTimeRange(StartTime, EndTime, SortAscending) |
Returns a sorted list of activities in the given time range as RDOItems collection. Recurring activities occurring within the specified range are expanded (i.e. only the matching instances but not the master activity are returned).
StartTime - start date/time of the range EndTime - end date/time of the range SortAscending - sort in the ascending order if true and descending order if false
|
set Session =
CreateObject("Redemption.RDOSession")
|
GetAllChildFolders |
Returns RDOFolders collection with all (not just immediate) subfolders. Note that only the Exchange provider in the online mode supports that. All other store providers would still return immediate child subfolders only.
|
|
GetAddressList |
Returns
RDOAddressList object corresponding to the
given Contacts folder or null if the folder is not exposed by the OAB provider. This method is the counterpart of the RDOAddressList.GetContactsFolder method. |
set Session = CreateObject("Redemption.RDOSession") Session.MAPIOBJECT = Application.Session.MAPIOBJECT set ABDialog = Session.GetSelectNamesDialog ABDialog.ActiveRecipientSelector = olBCC set Contacts = Session.GetDefaultFolder(olFolderSuggestedContacts) if (not (Contacts Is Nothing)) and (Contacts.ShowAsOutlookAB) Then ABDialog.InitialAddressList = Contacts.GetAddressList End If ABDialog.ShowOnlyInitialAddressList = True if ABDialog.Display Then for each recip in ABDialog.Recipients Debug.Print recip.Name & ": " & recip.Address next End If |
RemoveFromPFFavorites |
Removes a Microsoft Exchange public folder from the public folder's Favorites folder.
|
|
SetAsDefaultFolder(FolderType) |
Sets the folder as the default folder type in the parent message store. FolderType - one of the rdoDefaultFolders enums:
olFolderDeletedItems = 3 Note that the following folder
types are not valid for this method: olPublicFoldersAllPublicFolders,
olFolderConflicts, |
see the example above |