Solved

Get outertext of page loaded in Internet Explorer

Posted on 2003-11-11
3
273 Views
Last Modified: 2012-06-21
Experts, I don't have time to figure this out, so here's 400 points to anyone that can provide me a good answer with full source code. Here's The situation for which I am in urgent need of a solution: I have one instance of Internet Explorer already running. I want to run a vb program that will capture the outertext of the current page being displayed in that Internet Explorer. The vb program should know which browser to grab it from based on the page title or url.  (I cannot reload that page, as it will feed different results each time--so Inet, browser control, etc, is out of the question).  I simply need to get the contents of a page already loaded in a particular instance of Internet Explorer.  Many thanks in advance!
0
Comment
Question by:John Account
3 Comments
 
LVL 7

Accepted Solution

by:
_agj_ earned 400 total points
ID: 9728560
the following code assumes that u have an instance of IE open and with ur 'WANTED' page open.

Private Sub Form_Load()

Dim ie

Set ie = GetObject(, "InternetExplorer.Application")

'this prints the body part
Debug.Print ie.document.body.innerHTML

'to print the first element (mebbe u cud loop through the items or something if u need)
'Debug.Print ie.document.All.Item(0).innerHTML

Set ie = Nothing

End Sub

this shud giv u the stuff...mostly.
if u want outerHTML or some other element, change suitably.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 10537283
Moderator, my recommended disposition is:

    Accept _agj_'s comment(s) as an answer.

Dan Rollins -- EE database cleanup volunteer
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now