COM, Outlook, and constants
mhammond at skippinet.com.au
Wed Sep 11 18:59:27 EDT 2002
Ken Seehof wrote:
> 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
> Anyway, the symptom I am trying to resolve now is that
> 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__
makepy has not been run for this object library. Your code should use
gencache.EnsureDispatch() to ensure makepy support exists.
More information about the Python-list