pywintypes.com_error: (-2147221005, 'Invalid class string', None, None)
I am trying to run the following piece of python code:

    import win32com.client as win32
    word = win32.gencache.EnsureDispatch('Word.Application')
    word.Visible = False


But I get error messages:

>     Traceback (most recent call last):   File "C:\Python32\lib\site-packages\win32com\client\dynamic.py", line 83,
> in _GetGoodDispatch
>     IDispatch = pythoncom.connect(IDispatch) pywintypes.com_error: (-2147221005, 'Invalid class string', None, None)
> 
> During handling of the above exception, another exception occurred:
> 
> Traceback (most recent call last):   File
> "C:\EclipseWorkspaces\csse120\Myproject\src\wordconverter.py", line
> 24, in <module>
>     word = win32.gencache.EnsureDispatch('firefox.Application')   File "C:\Python32\lib\site-packages\win32com\client\gencache.py", line 529,
> in EnsureDispatch
>     disp = win32com.client.Dispatch(prog_id)   File "C:\Python32\lib\site-packages\win32com\client\__init__.py", line 95,
> in Dispatch
>     dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)   File
> "C:\Python32\lib\site-packages\win32com\client\dynamic.py", line 108,
> in _GetGoodDispatchAndUserName
>     return (_GetGoodDispatch(IDispatch, clsctx), userName)   File "C:\Python32\lib\site-packages\win32com\client\dynamic.py", line 85,
> in _GetGoodDispatch
>     IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch) pywintypes.com_error: (-2147221005, 'Invalid
> class string', None, None)


I am using python 3.2 on windows 7.

Can you please tell me what is the problem.

Thanks


pywintypes.com_error: (-2147221005, 'Invalid class string', None, None)
===

I am trying to run the following piece of python code:

    import win32com.client as win32
    word = win32.gencache.EnsureDispatch('Word.Application')
    word.Visible = False


But I get error messages:

>     Traceback (most recent call last):   File "C:\Python32\lib\site-packages\win32com\client\dynamic.py", line 83,
> in _GetGoodDispatch
>     IDispatch = pythoncom.connect(IDispatch) pywintypes.com_error: (-2147221005, 'Invalid class string', None, None)
> 
> During handling of the above exception, another exception occurred:
> 
> Traceback (most recent call last):   File
> "C:\EclipseWorkspaces\csse120\Myproject\src\wordconverter.py", line
> 24, in <module>
>     word = win32.gencache.EnsureDispatch('firefox.Application')   File "C:\Python32\lib\site-packages\win32com\client\gencache.py", line 529,
> in EnsureDispatch
>     disp = win32com.client.Dispatch(prog_id)   File "C:\Python32\lib\site-packages\win32com\client\__init__.py", line 95,
> in Dispatch
>     dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)   File
> "C:\Python32\lib\site-packages\win32com\client\dynamic.py", line 108,
> in _GetGoodDispatchAndUserName
>     return (_GetGoodDispatch(IDispatch, clsctx), userName)   File "C:\Python32\lib\site-packages\win32com\client\dynamic.py", line 85,
> in _GetGoodDispatch
>     IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch) pywintypes.com_error: (-2147221005, 'Invalid
> class string', None, None)


I am using python 3.2 on windows 7.

Can you please tell me what is the problem.

Thanks

