Does anyone know how to grab text within IE? For example, if I am typing text into this text box right now, how can I grab it using VB .net?
Grab Text within IE
Started by xxarmoxx, Apr 05 2007 03:54 PM
1 reply to this topic
#1
Posted 05 April 2007 - 03:54 PM
|
|
|
#2
Guest_NeedHelp_*
Posted 06 April 2007 - 05:42 AM
Guest_NeedHelp_*
You need to connect to the running instance of IE first:
And from there I'm sure you can grab the text. More info and the code above from: How to connect to a running instance of Internet Explorer
Dim SWs As New SHDocVw.ShellWindows
Dim IE As SHDocVw.InternetExplorer
Private Sub Form_Load()
Dim Doc
List1.Clear
List2.Clear
Text1.Text = SWs.count
For Each IE In SWs
List1.AddItem IE.LocationName
Set Doc = IE.Document
If TypeOf Doc Is HTMLDocument Then
'if this is an HTML page, display the title
'may or may not be the same as LocationName
List2.AddItem Doc.Title
End If
Next
End Sub
And from there I'm sure you can grab the text. More info and the code above from: How to connect to a running instance of Internet Explorer


Sign In
Create Account


Back to top









