COM, Outlook, and constants

Ken Seehof kseehof at neuralintegrator.com
Wed Sep 11 01:32:02 CEST 2002


I just upgraded my windows box to XP, and resumed working on a Outlook COM 
project
that I haven't touched for a few weeks.  For some reason it doesn't work 
anymore.
Anyway, the symptom I am trying to resolve now is that 
win32com.client.constants
doesn't seem to work anymore.  It's supposed to acquire attributes for all 
constants
defined in loaded COM servers through its __dicts__ attribute.

The following is typical of python COM client code.  Any hints?

 >>> import win32com.client
 >>> ol = win32com.client.Dispatch("Outlook.Application")
 >>> ns = ol.GetNamespace("MAPI")
 >>> oc = win32com.client.constants
 >>> oc.olFolderInbox
Traceback (most recent call last):
   File "<interactive input>", line 1, in ?
   File "C:\Python22\lib\site-packages\win32com\client\__init__.py", line 
131, in __getattr__
     raise AttributeError, a
AttributeError: olFolderInbox
 >>> oc.__dicts__
[]
 >>>

Thanks,
- Ken Seehof






More information about the Python-list mailing list