_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)

Syntax

'Declaration
<DispIdAttribute()> _
Sub SetAlwaysAssignCategories ( _
    Categories As String, _
    Store As Store _
)
'Usage
Dim instance As _Conversation
Dim Categories As String
Dim Store As Store

instance.SetAlwaysAssignCategories(Categories, _
    Store)
[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.

Remarks

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.

See Also

Reference

_Conversation Interface

_Conversation Members

Microsoft.Office.Interop.Outlook Namespace