Monday, 6 February 2012

Using an Inet Control to Retreive a Website HTML

The following program uses a Inet control to retrieve the HTML in a website and stores it in a text file on the desktop.
Private Sub Form_Load()
Dim strURL As String      ' URL string
Dim intFile As Integer   ' FreeFile variable
intFile = FreeFile()
strURL = "http://www.microsoft.com"
Open "C:\Users\PC\Desktop\MSsource.txt" For Output _
As #intFile
Write #intFile, Inet1.OpenURL(strURL)
Close #intFile
End Sub

No comments:

Post a Comment