THE Access developer in Iceland?

 

Home

 

Code samples

 
 
 

 

 

 

 

 

 

 


Nr.:


Tip of the moment is:

Read an internet site and write it in a text document
Following code read a website and write its source code to a text document. From the link within the code can you read more and see other fine links at the Microsoft site.

Private Sub cmdLesaAfNetinuHttp_Click()
'Refrence: Microsoft Internet Transfer Control 6.0 (SP4)
'Heimild: http://support.microsoft.com/default.aspx?scid=kb;en-us;209917
Dim objInet As New Inet
Dim b() As Byte

  'Set the Internet transfer control protocol and URL.
  objInet.Protocol = icHTTP
  objInet.URL = "http://www.althingi.is/xmetal/thingmenn.php4"

  'Retrieve the HTML data into a byte array.
  b() = objInet.openURL(objInet.URL, icByteArray)

  'Write in a textdocument
  Open Environ("USERPROFILE") & "\Desktop\Text.txt" For Binary Access Write As #1
    Put #1, , b()
  Close #1

  MsgBox "Read and written"

End Sub

Bibliography: Arni Laugdal
See also:

Send a comment (Article nr: 10676)