Help! Can't do COM

sjoshi at ingr.com sjoshi at ingr.com
Thu Oct 7 16:17:27 EDT 1999


Hello All
  I'm trying to do a simple COM dispatch in Python but I keep getting
this error:
xlApp = Dispatch("Excel.Application")
Traceback (innermost last):
  File "<interactive input>", line 1, in ?
  File "E:\Python\win32com\client\dynamic.py", line 70, in Dispatch
    IDispatch, userName = _GetGoodDispatchAndUserName
(IDispatch,userName,clsctx)
  File "E:\Python\win32com\client\dynamic.py", line 67, in
_GetGoodDispatchAndUserName
    return (_GetGoodDispatch(IDispatch, clsctx), userName)
  File "E:\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)

CAn someone please tell me what I'm missing. I did do this before
the Dispatch, from win32com.client.dynamic import Dispatch

thanks
Sunit


Sent via Deja.com http://www.deja.com/
Before you buy.




More information about the Python-list mailing list