Xin Zhao wrote:
> Thanks for your kind reply. 
>
> I tried the new iid, doesn't help. :(
>
> >>> import pythoncom
> >>> wo=pythoncom.New('InternetExplorer.Application')
> >>> wo.QueryInterface('{3050f485-98b5-11cf-bb82-00aa00bdce0b}')
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> pywintypes.com_error: (-2147467262, 'No such interface supported',
> None, None)
>
> Any further idea?

Yes.  The Internet Explorer application doesn't support that interface,
because a single IE instance can have multiple documents.  "wo" will be
an instance of IWebBrowser2.  You need to fetch a document from that
interface, then fetch the IHTMLDocument3 interface from that.  You want
the Document property, which is either:
    doc = wo.Document
or
    doc = wo.get_Document()

That "doc" object should be an IHTMLDocument2.  If you really need the
"...3" version, that's where you do the QueryInterface.

-- 
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.

_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to