Without knowing exactly what info you need to extract from the page it's
difficult to offer anything concrete, but something like this would get you
started:
Sub Tester()
dim oDoc
set oDoc = GetIE(
http://www.somesite.com/)
if not oDoc is nothing then
'do something with oDoc
msgbox oDoc.body.innerHTML
else
msgbox "not found"
end if
End Sub
'Find an open IE window with matching location and
' return a reference to the document object
Function GetIE(sAddress As String) As Object
Dim objShell As Object, objShellWindows As Object, o As Object
Dim retVal As Object, sURL As String
Set retVal = Nothing
Set objShell = CreateObject("Shell.Application")
Set objShellWindows = objShell.Windows
For Each o In objShellWindows
sURL = ""
On Error Resume Next
sURL = o.document.Location
On Error GoTo 0
If sURL < "" Then
If sURL Like sAddress & "*" Then
Set retVal = o.document
Exit For
End If
End If
Next o
Set GetIE = retVal
End Function
Tim
"Vivek" wrote in message
...
Tim,
Tried your tip but could not find any usable posts. Can you point to any
specific post in your knowledge that deals with code for trying to grab data
from IE. That would be very useful for me. This is only for one-time
personal use :)
Thanks,
Vivek
"Tim Williams" <timjwilliams at gmail dot com wrote in message
...
Google this group for "IE automation"
Tim
"Vivek" wrote in message
...
Hi,
I'm looking for code to grab data from a browser window that is currently
open. The browser title will be fixed.
I don't prefer the web query option as the data in question is accessible
only after logging in and other clicks. I use Office XP and Windows XP
SP2.
Thanks,
Vivek