_Conversation.SetAlwaysAssignCategories(String, Store) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Applies one or more categories to all existing items and future items of the conversation.
public:
void SetAlwaysAssignCategories(System::String ^ Categories, Microsoft::Office::Interop::Outlook::Store ^ Store);
public void SetAlwaysAssignCategories (string Categories, Microsoft.Office.Interop.Outlook.Store Store);
Parameters
- Categories
- 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
- Store
The Store in which items of the conversation should always be assigned the categories specified by the Categories
parameter.
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.