How to obtain hyperlink addresses from a given webpage? 
Author Message
 How to obtain hyperlink addresses from a given webpage?

Can anyone tell me which class instance and methods(of
Visual Basic 6) to use for obtaining all the hyperlink
addresses from a given webpage?

--Thanks

--Cosmo



Wed, 14 Dec 2005 11:45:55 GMT  
 How to obtain hyperlink addresses from a given webpage?
Include the Html Object Libray
Dim doc As HTMLDocument
Dim ElementCollection As IHTMLElementCollection
Dim ele As IHTMLElement
Set obj = CreateObject("Internetexplorer.application")
obj.navigate
"http://www.developersdex.com/vb/newmessage.asp?p=641&ID=%3C04e101c33d27
%24c7367680%24a501280a%40phx%2Egbl%3E&r=3147523"
Set doc = obj.document
Set ElementCollection = doc.getElementsByTagName("A")
For Each ele In ElementCollection
    MsgBox ele.getAttribute("href")
Next
set doc=nothing
set ElementCollection =nothing
set doc =nothing
set obj=nothing
Hope this helps
Raja Sekhar

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Tue, 20 Dec 2005 17:45:15 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Obtaining URLs from a given webpages.

2. HOW TO OBTAIN MY IP ADDRESS GIVE BY DHCP

3. How to obtain all the hyperlinks of a given webpage???

4. Obtaining email addresses from Global Address List

5. Obtaining SMTP Address from Global Address Book

6. Getting a machine's MAC address given a NETBIOS machine name or IP address

7. Hyperlinks - launch browser - load webpage

8. Obtain drive free space given the UNC?

9. Obtaining properties types from any given object

10. Obtaining properties types from any given object

11. Function to Obtain MAC Address

12. Obtain an address of a procedure

 

 
Powered by phpBB® Forum Software