Item method (Folders collection)
Returns a Folder object from the Folders collection. The object to be returned is specified by its position in the collection or by the name.
Syntax
Set
Folder
= Folders
.Item
(Index
)where
Folder
is the name of a Folder object or an expression that evaluates to a Folder object.Folders
is the name of a Folders collection or an expression that evaluates to a Folders collection.Index
is an expression that specifies the object to be returned.- If it is a numeric expression,Indexspecifies the object's position in the collection and is a number from 1 to the value of the collection'sCountproperty.
- If it is a string expression,Indexis the name of an object in the collection.
Remarks
- An error occurs if the value ofIndexdoes not match an existing member of the collection.
- Itemis the default method of the Folders collection. This means that the following lines of code are equivalent:Folders(1)Folders.Item(1)
Provide Feedback