trying to find a way to loop on a web page and grab an image.
<a href="http://www.taco.com/url/http://sharepointed.com/folder/src/blah.png" target="_blank">
gets a little more tricky, because i need to grab a url from the href.
Code:Dim objIE As Object Dim iDoc As HTMLDocument Dim iElmnt As IHTMLElement Dim strURL As String Dim strHTML As String strURL = "http://sharepointed.com" Set objIE = CreateObject("InternetExplorer.Application") With objIE .navigate strURL .Visible = True End With Do: Loop Until objIE.ReadyState = READYSTATE_COMPLETE Set iDoc = objIE.Document For Each iElmnt In iDoc.getElementsByTagName("a href") strHTML = iElmnt.outerHTML If InStr(1, strHTML, "http://sharepointed.com/folder/src/") > 0 Then x = 1 End If Next




Reply With Quote