'Get all MS Outlook Appointment Categories

I understand how to get the categories assigned to an individual appointment. From that, I can easily extrapolate how to get all of the categories assigned to any appointment in a calendar. However, there may be defined categories that aren't actually used for any appointments thusfar, I intend on still being able to capture these.

The end result is that my application should be able to present the user with a drop-down of all configured categories in MS Outlook. How would I go about doing this using interop?

So far I've looked through various classes contained within the Microsoft.Office.Interop library but I can't seem to find anything resembling a .GetAvailableCategories() method. Google has been a bit of a brick wall on this issue as well.



Solution 1:[1]

Use Namespace.Categories collection. If you want categories from another store (e.g. a delegate Exchange mailbox), you can either read the hidden (associated) message from the default Calendar folder in that store (you can see the data in OutlookSpy - I am its author - click IMAPIFolder, go to the "Associated Contents" tab) or use Redemption (I am also its author): it exposes categories on the store level (RDOPstStore.Categories, RDOExchangeMailboxStore.Categories, etc.).

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