![]() |
record all links durng navigation using VBA
hi
here is the basic idea: Code: Private sub nav1() 'turn link logger on Set ie = CreateObject("InternetExplorer.Application") With ie ..Navigate "http://msn.com" Do Until .ReadyState = 4: DoEvents: Loop Do While ie.busy: DoEvents: Loop end with 'turn link logger off end sub after running the above code (navigating to msn.com) if you check the index.dat file a second later, these are all the links that show up related to navigating to just this one page (msn.com): http://stj.msn.com/br/om/js/1/s_code.js http://ads1.msn.com/library/dap.js http://www.msn.com/ http://st.msn.com/br/hp/en-us/js/6/hptg.js http://stc.msn.com/br/hp/en-us/css/10/blu.css http://st.msn.com/br/hp/en-us/js/6/hpb.js http://stc.msn.com/br/hp/en-us/css/10/override.css http://stc.msn.com/br/hp/en-us/css/10/ie.css http://stc.msn.com/br/hp/en-us/css/10/ushp.css http://st.msn.com/br/hp/en-us/js/6/ieminwidth.js however, the way i got those links was from another program. i want to have the code to get those same links and then record them to a text file instead of having to shell out to an external program to get them. before you think all i need to do is access IE's index.dat file, unfortunately there is a catch, and it is because of that catch i am posting this thread. it turns out that in some cases IE does not properly store the entire link in its index cache file! so if a VBA routine is written to access the index.dat file it is a waste of effort because the index.dat file will often truncate links like .asp?. ..aspx?, .php?, etc and make the suffix .htm instead, which is a real annoyance. that means i need to code the VBA to get the links on its own, independently of IE's index.dat file. there is a litle program that captures the *right* links, but i dont want to shell out to anothr program, i was hoping to keep all the code contained in the VBA code. any ideas on this are appreciated! |
All times are GMT +1. The time now is 09:57 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com