|Outlook Developer Reference|
Version Added: Outlook 2007
Microsoft Office Outlook 2007 provides a categorization system by which Outlook items can be easily identified and grouped into user-defined categories. The Categories object represents the set of user-defined categories available to the user of a given mailbox.
Use the Add method to create a new Category object and append it to the collection. Use the Item method to obtain a Category object reference for an existing category, and the Remove method to remove a Category object from the collection. Use the Count property to return the number of categories contained in the collection.
The following Visual Basic for Applications (VBA) example displays a dialog box containing the names and identifiers for each Category object contained in the Categories collection associated with the default NameSpace object.
|Visual Basic for Applications|