[python-win32] Dispatch Error

James Matthews nytrokiss at gmail.com
Tue Jul 10 00:20:00 CEST 2007


I see people using this code however it doesn't seem to work for me! Any
help

Thanks James

Code:
from win32com.client import constants, Dispatch
outlook = Dispatch("Outlook.Application")


Error

com_error: (-2146959355, 'Server execution failed', None, None)

Traceback (innermost last):

File "c:\Users\blank\Desktop\Code\Outlook Extention\untitled-1.py", line 1,
in <module>
  from win32com.client import constants, Dispatch
File "c:\Users\blank\Desktop\Code\Outlook Extention\untitled-1.py", line 2,
in <module>
  outlook = Dispatch("Outlook.Application")
File "C:\Python25\Lib\site-packages\win32com\client\__init__.py", line 95,
in Dispatch
  dispatch, userName =
dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
File "C:\Python25\Lib\site-packages\win32com\client\dynamic.py", line 98, in
_GetGoodDispatchAndUserName
  return (_GetGoodDispatch(IDispatch, clsctx), userName)
File "C:\Python25\Lib\site-packages\win32com\client\dynamic.py", line 78, in
_GetGoodDispatch
  IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx,
pythoncom.IID_IDispatch)

-- 
http://www.goldwatches.com/watches.asp?Brand=14
http://www.jewelerslounge.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20070709/f8a22f5e/attachment.html 


More information about the Python-win32 mailing list