I have a python program that does some things on Exchange mailboxes. I use the MAPI.Session object for this and create it like this:


PythonWin 2.4.2 (#67, Oct 30 2005, 16:11:18) [MSC v.1310 32 bit (Intel)] on win32.
Portions Copyright 1994-2004 Mark Hammond ([EMAIL PROTECTED]) - see 'Help/About PythonWin' for further copyright information.
>>> import win32com.client
>>> MAPISession = win32com.client.Dispatch("MAPI.Session")
>>> MAPISession.Logon()
>>> for infostores in MAPISession.InfoStores:
...     print infostores.Name
...    
Public Folders
Mailbox - Rudy Schockaert
>>>
----------------------

If I now use makepy to create a genpy for the CDO 1.21 library (MAPI.Session) I get the following result:

PythonWin 2.4.2 (#67, Oct 30 2005, 16:11:18) [MSC v.1310 32 bit (Intel)] on win32.
Portions Copyright 1994-2004 Mark Hammond ([EMAIL PROTECTED]) - see 'Help/About PythonWin' for further copyright information.
>>> import win32com.client
>>> MAPISession = win32com.client.Dispatch("MAPI.Session")
>>> MAPISession.Logon()
>>> for infostores in MAPISession.InfoStores:
...     print infostores.Name
...    
Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
  File "C:\Python24\lib\site-packages\win32com\gen_py\3FA7DEA7-6438-101B-ACC1-00AA00423326x0x1x21.py ", line 3039, in __getitem__
    return self._get_good_object_(self._oleobj_.Invoke(*(21, LCID, 2, 1, item)), "Item")
com_error: (-2147352565, 'Invalid index.', None, None)

----------------------

Am I doing something wrong? Forgetting something? Can someone explain this?

Thanks in advance,

Rudy



_______________________________________________
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to