This documentation is archived and is not being maintained.

Category Interface

Represents a user-defined category by which Microsoft Outlook items can be grouped.

Namespace:  Microsoft.Office.Interop.Outlook
Assembly:  Microsoft.Office.Interop.Outlook (in Microsoft.Office.Interop.Outlook.dll)

public interface Category : _Category

This is a .NET interface derived from a COM coclass that is required by managed code for interoperability with the corresponding COM object. Use this derived interface to access all method, property, and event members of the COM object. However, if a method or event you want to use shares the same name under the same COM object, cast to the corresponding primary interface to call the method, and cast to the latest events interface to connect to the event. Refer to this topic for information about the COM object. For information about the method and property members of the COM object, see _Category.

Outlook provides a categorization system with which Outlook items can be easily identified and grouped into user-defined categories. The Category object represents a user-defined category.

Use the Add method of the Categories property for the NameSpace object to create a new Category object, adding the category to the Master Category List for that namespace.

Use the Name property to specify the name of the category, the Color property to specify the color displayed for that category, and the ShortcutKey property to specify the shortcut key used to assign that category to an Outlook item in the Outlook user interface. Use the CategoryID property to retrieve the unique identifer for a category.

Categories can be assigned to Outlook items by specifying the names of the appropriate Category objects in a comma-delimited string in the Categories property of the following objects: