Q: Basic MAPI

Henrik Mårtensson henrik.martensson at frontconsulting.se
Fri Dec 22 06:10:11 EST 2000


Hi

I'm trying to run a basic MAPI initialisation, but I get stuck with the
dispatcher.

Below I have pasted the code I'm running. Is there something that you have
to do
to make the MAPI interface available to you? I'm not running this in a MS
Exchange
office environment.

Henrik

>>> from win32com.client import Dispatch
>>> from win32com.mapi import mapi
>>> s=Dispatch("Mapi.Session")
Traceback (innermost last):
  File "<interactive input>", line 1, in ?
  File "D:\Program Files\Python\win32com\client\__init__.py", line 13, in
Dispatch
    dispatch, userName =
dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
  File "D:\Program Files\Python\win32com\client\dynamic.py", line 67, in
_GetGoodDispatchAndUserName
    return (_GetGoodDispatch(IDispatch, clsctx), userName)
  File "D:\Program Files\Python\win32com\client\dynamic.py", line 58, in
_GetGoodDispatch
    IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx,
pythoncom.IID_IDispatch)
com_error: (-2147221005, 'Invalid class string', None, None)
>>>





More information about the Python-list mailing list