I found this code on the Net and it works for extracting hyperlinks from a Web Page but how do I do something similar for Images?
Also, any reason why the author used Navigate2 instead of just Navigate. What's the difference?
Code:Dim d As New HTMLDocument ' ' You need to add a Reference to Microsoft HTML Objects Library ' Private Sub Command1_Click() WebBrowser1.Navigate2 "http://www.somewebsite.com/......./" End Sub Private Sub Command2_Click() Dim HyperLinks As String Set d = WebBrowser1.Document HyperLinks = "" For i = 0 To d.links.length - 1 l = d.links.Item(i) HyperLinks = HyperLinks & vbNewLine & "<a href='" & l & "'>" & l & "</a>" & "<br>" Next Text1.Text = Text1 & HyperLinks End Sub




Reply With Quote