Solved

Getting HTML from particular frame in webbrowser

Posted on 2000-04-11
5
156 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
passing a value with stream reader AFTER a ";" 3 66
Macro Excel - Multiple If conditions 2 72
Help me. 3 54
Copy a range from 1..n excel sheets to one destination sheet 2 31
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

770 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