編輯

共用方式為


Categories Interface

Definition

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

public interface class Categories : Microsoft::Office::Interop::Outlook::_Categories
[System.Runtime.InteropServices.Guid("000630E4-0000-0000-C000-000000000046")]
public interface Categories : Microsoft.Office.Interop.Outlook._Categories
Public Interface Categories
Implements _Categories
Derived
Attributes
Implements

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(String, Object, Object) method to create a new Category object and append it to the collection. Use the Item[Object] property (this in C#) to obtain a Category object reference for an existing category, and the Remove(Object) method to remove a Category object from the collection. Use the Count property to return the number of categories contained in the collection.

Properties

Application

Returns an Application object that represents the parent Outlook application for the object. Read-only.

(Inherited from _Categories)
Class

Returns an OlObjectClass constant indicating the object's class. Read-only.

(Inherited from _Categories)
Count

Returns an Integer (int in C#) value indicating the count of Category objects in the specified collection. Read-only.

(Inherited from _Categories)
Item[Object]

Returns an Category object from the collection.

(Inherited from _Categories)
Parent

Returns the parent Object of the specified object. Read-only.

(Inherited from _Categories)
Session

Returns the NameSpace object for the current session. Read-only.

(Inherited from _Categories)

Methods

Add(String, Object, Object)

Creates a new Category object and appends it to the Categories collection.

(Inherited from _Categories)
Remove(Object)

Removes an object from the collection.

(Inherited from _Categories)

Applies to