[Tutor] COM & IE problems

Alan Gauld alan.gauld at btinternet.com
Fri Jun 27 00:22:36 CEST 2008

"Aaron Colichia" <coreconcern at gmail.com> wrote

> need to start using comtypes.client because it provides a better 
> wrapper for

No expert but looking at the error message...

>>>> ie = comtypes.client.CreateObject('InternetExplorer.Application')
>>>> ie.__clsid
> '{0002DF01-0000-0000-C000-000000000046}'

>>>> newie = 
>>>> comtypes.client.GetActiveObject('InternetExplorer.Application')
> Traceback (most recent call last):
>    obj = comtypes.GetActiveObject(clsid, interface=interface)

Note it says GetActiveObject takes a clsID as the parameter.
Yopu are passing a name.

try passing ie.__clsid as the first parameter and see if that works?

Just a guess,

Alan G. 

More information about the Tutor mailing list