Редагувати

Поділитися через


Folders object (Outlook)

Contains a set of Folder objects that represent all the available Outlook folders in a specific subset at one level of the folder tree.

Remarks

Use the Folders property to return the Folders object from a NameSpace object or another Folder object.

Use Folders (index), where index is the name or index number, to return a single Folder object. Folder names are case-sensitive.

Example

The following Visual Basic for Applications (VBA) example returns the folder named Old Contacts.

Set myNameSpace = Application.GetNameSpace("MAPI") 
 
Set myFolder = _ 
 
 myNameSpace.GetDefaultFolder(olFolderContacts) 
 
Set myNewFolder = myFolder.Folders("Old Contacts")

The following Visual Basic for Applications example returns the first folder.

Set myNewFolder = myFolder.Folders(1)

See also

Outlook Object Model Reference

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.