Thanks, Pat Avery
.Document.Body.Innerhtml will get you the raw HTML of the body.
If you need the whole page (with scripts in the HEADER and so on)
you must use the IPersist*-Interfaces.
HTH
Thomas
Patrick Avery schrieb in Nachricht <37715CF8...@research-tank.com>...
For Ie5, it's a breeze!
'
' Requires "Project/References" to
' Microsoft HTML Object Library (MSHTML.tlb)
'
' =============================================
Dim HTMLDoc As MSHTML.HTMLDocument
Dim oHTML As MSHTML.HTMLHtmlElement
Dim strHTML As String
Set HTMLDoc = wbr.Document ' wbr = WebBrowser Control
Set oHTML = HTMLDoc.getElementsByTagName("HTML")(0)
strHTML = oHTML.outerHTML ' <== it's here
' =============================================
--
Barry Evans
Canberra, Australia
-
Patrick Avery <paver...@research-tank.com> wrote in message
news:37715CF8...@research-tank.com...
Barry Evans schrieb in Nachricht ...
>For Ie4, this cannot be done with functionality native to VB and/or IE. See
>Thomas Ganss reply in this thread for the compromise. He used to make
>available on his site a library which helped to do this, but I can't
>remember the site name.
it wasn't my but Ben Baird's typelib for IPersistfile.
I only realized that it would solve that particular problem for VB.
You can also go via c++ for IPersistStreamInit or IPersistFile
without any .tlb's and create a dll to call from VB.
I am not sure wether Ben put the lib up again on
VBThunder.Com, (recommended anyway),
but he sent it in a few weeks ago for a similar question.
Since it isn't my work, I don't feel free to send it to you,
and always posting would mean unnecessary traffic on the net.
But you can definitely find it in deja searching
for Ben's name from his earlier posting...
HTH
Thomas