MAPIFolder Object
Description
Represents an Outlook folder. A MAPIFolder object can contain other MAPIFolder objects, as well as Outlook items. You can navigate nested folders by using a combination of Folders(index), which returns a folder within a name space or another folder, and the Parent property, which returns the containing object.
Using the MAPIFolder Object
Use Folders(index), where index is the name or index number, to return a single MAPIFolder object from a NameSpace object or another MAPIFolder object.
There is a set of folders within an Outlook data store that support the default functionality of Outlook. Use GetDefaultFolders(index), where index is one of the OlDefaultFolders constants (olFolderCalendar, olFolderContacts, olFolderDeletedItems, olFolderInbox, olFolderJournal, olFolderNotes, olFolderOutbox, olFolderSentMail, olFolderTasks), to return one of the default Outlook folders in the Outlook NameSpace object.
Use the Add method to add a folder to the Folders collection. The Add method has an optional argument that can be used to specify the type of items that can be stored in that folder. By default, folders created inside another folder inherit the type of the parent folder.
Remarks
Folders within the Outlook data store can be typed; for example, the Calendar folder will only contain AppointmentItem objects and the Contacts folder will only contain ContactItem objects.
Note that when items of a specific type are saved, they are saved directly into their corresponding default folder. For example, when the GetAssociatedAppointment method is applied to a MeetingRequestItem in the Inbox folder, the appointment that is returned will be saved to the default Calendar folder.
Properties
Application property, DefaultItemType property, DefaultMessageClass property, Description property, EntryID property, Folders property, Items property, Name property, Parent property, StoreID property, UnReadItemCount property.
Methods
CopyTo method, Delete method, Display method, GetExplorer method, MoveTo method.