Sure, the sub below will be the key...
Private Sub ocxBrowser_DownloadComplete()
On Error Resume Next
strFileName = "C:\Source.txt"
Set objIE = Me.ocxBrowser.Object
Open strFileName For Output As #1
Print #1, objIE.Document.body.innerHTML
Close #1
txtAddress = objIE.LocationURL
Beep
End Sub
This saves the html code of the page to a file called Source.txt on your C:Drive.
There may be a better design, but I would set up a global integer called intCounter, and an Array containing the URL's that you would like to check.
When a button is pushed, or however else you would like to start it, set the Browser to the first URL. When the whole page is downloaded, it will run the sub above. Add some code in here that opens the files and checks to see if it is a "Page Not Found" page or something else. Do whatever event you need to like send yourself and email with the URL, pop up a MsgBox etc. When that is done, increment intCounter, and set the url of the browser to urlArray(intCounter). You will probably want to put an if statement that only does this if there are still URL's to check. Otherwise, have it give you a completed message or something.
I am headed out in a few minutes, but may be able to get you some more help if you need it.
Mike
Mike
EchoVue.com
|