Export (0) Print
Expand All

_Conversation.SetAlwaysAssignCategories Method

Applies one or more categories to all existing items and future items of the conversation.

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

[DispIdAttribute()]
void SetAlwaysAssignCategories(
	string Categories,
	Store Store
)

Parameters

Categories
Type: System.String

A comma-delimited String (string in C#) of one or more category names that are always assigned to all items in the conversation.

Store
Type: Microsoft.Office.Interop.Outlook.Store

The Store in which items of the conversation should always be assigned the categories specified by the Categories parameter.

If the store specified by the Store parameter represents a non-delivery store such as an archive .pst store, the method returns a string of categories that are applied to conversation items in the default delivery store.

The ItemChange event of the Items object occurs when you call the SetAlwaysAssignCategories method on a conversation.

To determine existing master categories for the current user, examine the Categories property of the Store object that is specified by the Store parameter. If one or more categories specified by the Categories parameter do not exist in the master categories collection, the categories will be assigned to the conversation but will not be added to the master categories collection.

To determine the existing categories that are always assigned to items of the conversation in the specified store, use the GetAlwaysAssignCategories(Store) method.

If SetAlwaysAssignCategories is called more than once, the result is cumulative. For example, if you call SetAlwaysAssignCategories specifying the category “Important” and then call SetAlwaysAssignCategories again specifying the categories "Business" and "Social", the categories that are always assigned are "Important", "Business", and "Social".

To stop the action of always assigning categories, use the ClearAlwaysAssignCategories(Store) method. After the ClearAlwaysAssignCategories method has been called, GetAlwaysAssignCategories returns an empty String (string in C#).

The SetAlwaysAssignToCategories method ignores any category names that are empty strings. For example, if the Categories parameter is set to the string "Work,,Play", "Work" and "Play" are assigned to the conversation and the empty string category is ignored.

Show:
© 2014 Microsoft