Automating Microsoft Outlook

For Outlook automation it is nesseccary to use the makepy utility. You do this either from the tools menu of the Pythonwin-Editor (installed with Pywin32 or ActivePython) or you call the file c:\python23\Lib\site-packages\win32com\client\ You then have to select the Outlook Object Library (“Microsoft Outlook 10.0 Object Library” for Office 10.0 or known as Office XP).

After that Python generates cachefiles into the directory c:\python23\Lib\site-packages\win32com\gen_py or c:\temp\gen_py to tell Python more about the Outlook object library.

Here is a well known example which dumps all adressbook entries from your default adressbook:

Leave a Reply