|
RDOFavorites collection provides access to
the list of favorite folders defined in a given store.
Returned by:
RDOSession.Favorites
RDOStore2.Favorites
The example below open or creates a
folder and adds it as an Outlook favorite .
Set MySession =
CreateObject("Redemption.RDOSession")
MySession.MAPIOBJECT = Application.Session.MAPIOBJECT
Set Inbox =
MySession.GetDefaultFolder(olFolderInbox)
'open or add a folder
set NewFolder =
Inbox.Folders.OpenOrAdd("The
Favorite Folder")
set Favorites =
MySession.Favorites
'try to retrieve an existing favorite object by the folder
'can also be retrieved by name or index
set Favorite =
Favorites.Item(NewFolder)
if Favorite
Is
Nothing
Then
set Favorite = Favorites.Add(NewFolder)
End
If
|
Properties
Methods
|
Derived from:
IDispatch
|
|
Properties |
|
_NewEnum
|
Hidden .Returns
IEnumVariant object that allows
foreach (C#) and "for
each" (VB) iterators.
|
set
MySession = CreateObject("Redemption.RDOSession")
MySession.MAPIOBJECT =
Application.Session.MAPIOBJECT
set
Favorites = MySession.Favorites
for each Favorite
in Favorites
if
Favorite.FolderType = 1 Then
'fftMail
Debug.Print Favorite.Name
End
If
next
|
Count
|
Integer Read-only.
Returns the number of RDOFavorite objects in the collection.
|
|
Store
|
RDOStore, read-only.
Returns the parent store where the RDOFavorites
collection is defined.
|
|
_Item[IndexOrNameOrFolder]
|
Hidden, default collection property.
|
|
|
Methods |
|
Add(Folder)
|
Add the specified RDOFolder object as a
favorite and returns the corresponding
RDOFavorite object
|
see example above. |
Clear
|
Deletes all favorite objects in the collection.
|
|
Item(IndexOrNameOrFolder)
|
Returns RDOFavorite object corresponding
to the argument.
IndexOrNameOrFolder - Either an integer index (1
through Count), a string (name of the favorite folder), or
RDOFolder object.
If no favorite object can be found, null is returned.
|
|
Remove(IndexOrNameOrFolder)
|
Deletes RDOFavorite object corresponding
to the argument.
IndexOrNameOrFolder - Either an integer index (1
through Count), a string (name of the favorite folder), or
RDOFolder object.
If no favorite object can be found, no action is performed.
|
|
|
|