'How can I track an event in outlook if any user is adding or deleting outlook category

In my case suppose an outlook script is running on an extra system based on excel rules for email categorizations. Now (ABC) mail box is configured on extra system and approx. 100 users are using that mail box on their local system. So if any email comes based on excel category rules emails are assigned to them. Now I want to track if any user adds or deletes any category using their system.

So my question is is there any way using that i can perform this action like (Using outlook vba code, c# code or outlook addins), If anyone knows anything please let me know.



Solution 1:[1]

Categories are stored in the default message store (mailbox or pst). Namespace.Categories will grab the categories from the default mail store. You may also use the Store object representing that mailbox from NameSpace.Stores and use Store.Categories to grab the Categories collection for that Store.

Read more about Categories and their location in the Outlook Categories and Color Categories article.

P.S. Use MFCMAPI or OutlookSpy for exploring Outlook internals.

Solution 2:[2]

Categories are stored in a hidden message (message class == "IPM.Configuration.CategoryList") in the default Calendar folder - look at the PR_ROAMING_XMLSTREAM MAPI proprietary in OutlookSpy (I am its author - go to the Calendar folder, click IMAPIFolder button, go to the "Associated Contents' tab, double click on the IPM.Configuration.CategoryList" item).

Outlook Object Model won't let you track changes to that item. If using Redemption (I am also its author) is an option, you can open that item as RDOMail object from the RDOFolder.HiddenItems collection and use the RDOMail events

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Eugene Astafiev
Solution 2