'save a webpage to a file
'add a reference to the Microsoft Internet Transfer Control
Private Sub Command1_Click()
Dim URL() As Byte
'set protocol to HTTP
Inet1.Protocol = icHTTP
Inet1.URL = "http://www.microsoft.com"
' Retrieve the HTML data into a byte array.
URL() = Inet1.OpenUrl(Inet1.URL, icByteArray)
' Create a file for the data.
Open "webpage.htm" For Binary Access Write As #1
Put #1, , URL()
Close #1
End Sub
|