Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 30079

Get list of categories in specific Outlook folder/inbox

$
0
0

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?


Viewing all articles
Browse latest Browse all 30079

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>