Home/Support/Support Forum/Getting error when using session = Dispatch('MAPI.session')
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Getting error when using session = Dispatch('MAPI.session')

0 votes
I am getting Following error when i try to connect MAPI.session using win32com.client

from win32com.client import Dispatch
session = Dispatch('MAPI.session')

Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
session = Dispatch('MAPI.session')
File "C:\Python27\lib\site-packages\win32com\client\__init__.py", line 95, in Dispatch
dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 114, in _GetGoodDispatchAndUserName
return (_GetGoodDispatch(IDispatch, clsctx), userName)
File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 91, in _GetGoodDispatch
IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch)
com_error: (-2147221005, 'Invalid class string', None, None)
asked Jan 17, 2017 in Python by Tamilarasan New to the Community (0 points)

Please log in or register to answer this question.

...