hi,

I am trying to open an outlook and read the mails in the inbox.

First of all,I am not able to open the Outlook,
My code

import win32com.client
import pywintypes
import pythoncom
obj = win32com.client.Dispatch("Outlook.Application")

---> here I ma getting errors:

C:\Documents and Settings\Administrator\Desktop>python test.py
Traceback (most recent call last):
  File "test.py", line 5, in <module>
    obj = win32com.client.Dispatch("Outlook.Application")
  File "C:\Python25\Lib\site-packages\win32com\client\__init__.py", line 95,
in
Dispatch
    dispatch, userName =
dynamic._GetGoodDispatchAndUserName(dispatch,userName,c
lsctx)
  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.II
D_IDispatch)
*pywintypes.com_error: (-2147221005, 'Invalid class string', None, None)

Any body can telll me , what am i doing wrong in my code.

Antony
*

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to