I am trying to extract a list of categories in a specific Outlook folder with Python.
For example I am connected to the following inboxes "Personal" and "Work".
The following code will return the list of categories in the master list for my Personal inbox:
outlook = win32com.client.Dispatch("Outlook.Application")
myfolder = outlook.GetNamespace("MAPI").Folders["Work"]
for cat in myfolder.session.categories:
print cat
So how do I get that list for my Work inbox?