Mike Cravitz wrote:

> 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):
> [trimming traceback]
> com_error: (-2147221005, 'Invalid class string', None,
> None)
>
> What's wrong here?

My first guess would be that you don't have Mapi properly registered on your
machine... have you verified that "Mapi.Session" works in other contexts?  (If
nothing else, you can open regedit and search for that string, to see if there's
anything registered at all...)  Also keep in mind that the identifier string
should be case-sensitive, so you may want to double-check your casing.... (just
in case ;) )

I'd also suspect Mapi.Session of not being an IDispatch interface, but if you're
pulling this from the examples in the book then I suppose that's not likely.

Jeff Shannon
Technician/Programmer
Credit International


_______________________________________________
ActivePython mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/listinfo/activepython

Reply via email to