Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A2k Talking to IE6

Status
Not open for further replies.

jdraw

Technical User
Sep 18, 2002
5
0
0
CA
Looking for help/advice or sample code to open IE6 from code in A2K. Am interested in how to do
a File|Save As Webpage, Complete.
We have a database of 60000 companies and want to put extracts of selected 100-500 companies (html and graphics etc) onto a CD for use with Offline Browser.

Can not figure out how to get to IE6 File | Save As.

I have found and adjusted some code to open a page
with IE browser and save all the links on the page.

Anyone with details/examples dealing with InternetExplorer.Document?

Any help would be appreciated.

TIA

jack
Code:
'---- CODE to GET the Links from a given page ----
'---------------------------------------------------------------------------------------
' Procedure : GetLinks
' DateTime  : 2005-06-02 14:19
' Author    :
' Purpose   : get all links from a named webpage URL
'---------------------------------------------------------------------------------------
'
Sub GetLinks()

' ** need to set a reference to
' ** Microsoft Internet Controls

    Dim IeApp As InternetExplorer
    Dim sURL As String
    Dim IeDoc As Object
    Dim i As Long
    
   'Create new instance of IE
    Set IeApp = New InternetExplorer
    
    'May wish to make IeApp visible
    'apparently some things don't work
    'unless it's visible
    IeApp.Visible = False
    
    'define the page to open
    sURL = "[URL unfurl="true"]www.diligens.com"[/URL]
    
    'navigate to the page based on URL
    IeApp.Navigate sURL
   
    'Pause until the webpage is completely loaded
    Do
    Loop Until IeApp.ReadyState = READYSTATE_COMPLETE
    
    'Create instance of Document object
    Set IeDoc = IeApp.Document
  
    'Loop through the document's links collection.
    For i = 0 To IeDoc.links.Length - 1
        Debug.Print IeDoc.links(i).href
    Next i
    
    'Clean up
    Set IeApp = Nothing
    Set IeDoc = Nothing
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top