Solved

Getting HTML from particular frame in webbrowser

Posted on 2000-04-11
5
159 Views
Last Modified: 2010-05-02
I'm able to get the body html from the webbrowser by using this command:

t1.text = WebBrowser1.Document.body.innerhtml

but if the webpage uses frames how do I specify that I want the source from a particular frame?
0
Comment
Question by:basica
  • 3
  • 2
5 Comments
 
LVL 9

Accepted Solution

by:
samopal earned 35 total points
ID: 2703971

GetFrame WebBrowser1.Document

Function GetFrame(objFr as object) as string
dim Fr as object

For each Fr in objFr.Frames
 getframe Fr.Document
next

debug.print objFr.body.InnerHTML
end function

HTH
0
 

Author Comment

by:basica
ID: 2704084
I get runtime error 91: object variable or with block variable not set, on this line....

For Each Fr In objFr.Frames
0
 

Author Comment

by:basica
ID: 2704127
Actually, ignore that last comment, that's because there was no page in the webbrowser.  But now when there is a page in there I get this error:

[438] object doesn't support this property or method, on this line...

For Each Fr In objFr.frames
0
 

Author Comment

by:basica
ID: 2704189
Thanks.. I sorted it out.. I managed to get the html of the frame by doing this:

Text1.Text =
WebBrowser1.Document.
frames(x).Document.body.innerhtml
0
 
LVL 9

Expert Comment

by:samopal
ID: 2704281
Try to change code :

If objFr.Frames.length > 0 then
For each Fr in objFr.Frames
 getframe Fr.Document
next
end if

0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question