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)

Syntax

'Declaration
<GuidAttribute("000630E3-0000-0000-C000-000000000046")> _
<CoClassAttribute(GetType(CategoryClass))> _
Public Interface Category _
    Inherits _Category
'Usage
Dim instance As Category
[GuidAttribute("000630E3-0000-0000-C000-000000000046")]
[CoClassAttribute(typeof(CategoryClass))]
public interface Category : _Category

Remarks

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:

AppointmentItem

RemoteItem

ContactItem

ReportItem

DistListItem

SharingItem

DocumentItem

TaskItem

JournalItem

TaskRequestAcceptItem

MailItem

TaskRequestDeclineItem

MeetingItem

TaskRequestItem

NoteItem

TaskRequestUpdateItem

PostItem

See Also

Reference

Category Members

Microsoft.Office.Interop.Outlook Namespace

Other Resources

How to: Enumerate and Add Categories

How to: Assign Categories to an Item

How to: Create a Rule to Assign Categories to Mail Items Based on Multiple Words in the Subject