Muokkaa

Jaa


Folders.Item method (Outlook)

Returns a Folder object from the collection.

Syntax

expression.Item (Index)

expression A variable that represents a Folders object.

Parameters

Name Required/Optional Data type Description
Index Required Variant Either the index number of the object, or a value used to match the default property of an object in the collection.

Return value

A Folder object that represents the specified object.

Example

The following example adds the public folder Internal to the user's Favorites folder by using the AddToPFFavorites method.

Sub AddToFavorites() 
 
 'Adds a Public Folder to the List of favorites 
 
 Dim objFolder As Outlook.Folder 
 
 Set objFolder = Application.Session.GetDefaultFolder(olPublicFoldersAllPublicFolders).Folders.Item("GroupDiscussion").Folders.Item("Standards").Folders.Item("Internal") 
 
 objFolder.AddToPFFavorites 
 
End Sub

See also

Folders Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.