?
Solved

Getting HTML from particular frame in webbrowser

Posted on 2000-04-11
5
Medium Priority
?
170 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 9

Accepted Solution

by:
samopal earned 70 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

801 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