I am using PythonWin 2.1 and I'm trying to enter the
instructions shown in the section of the book "Python
Programming on Win32" regarding Collaboration Data
Objects (CDOs) on page 278. I enter the following two
commands in the PythonWin interactive session...

from win32com.client import Dispatch
s=Dispatch("Mapi.Session")

and get the following traceback...

Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
  File "D:\Python21\win32com\client\__init__.py", line
94, in Dispatch
    dispatch, userName =
dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
  File "D:\Python21\win32com\client\dynamic.py", line
81, in _GetGoodDispatchAndUserName
    return (_GetGoodDispatch(IDispatch, clsctx),
userName)
  File "D:\Python21\win32com\client\dynamic.py", line
72, in _GetGoodDispatch
    IDispatch = pythoncom.CoCreateInstance(IDispatch,
None, clsctx, pythoncom.IID_IDispatch)
com_error: (-2147221005, 'Invalid class string', None,
None)

What's wrong here?

(follow-on question): Assumming I can get the examples
in the book working, ...How can I include an
attachment in a Python script which generates an
email? Where can I read about how to add attachments
and to do other various things with CDOs. Thanks very
much.

Mike


__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com
_______________________________________________
ActivePython mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/listinfo/activepython

Reply via email to