Partager via


Categories Interface

Represents the collection of Category objects that define the Master Category List for a namespace.

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

Syntax

'Declaration
<GuidAttribute("000630E4-0000-0000-C000-000000000046")> _
<CoClassAttribute(GetType(CategoriesClass))> _
Public Interface Categories _
    Inherits _Categories
'Usage
Dim instance As Categories
[GuidAttribute("000630E4-0000-0000-C000-000000000046")]
[CoClassAttribute(typeof(CategoriesClass))]
public interface Categories : _Categories

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 _Categories.

Microsoft Outlook 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 Categories property of the NameSpace object to obtain a Categories object reference, representing the Master Category List for that namespace.

Use the Add method to create a new Category object and append it to the collection. Use the Item property (this in C#) 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.

See Also

Reference

Categories Members

Microsoft.Office.Interop.Outlook Namespace

Other Resources

How to: Assign Categories to an Item

How to: Enumerate and Add Categories

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