Results 1 to 2 of 2

Thread: save *.gif from webpage.

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Stockholm, Sweden
    Posts
    316

    save *.gif from webpage.

    Hi guys!

    I´ve found a shareware program that downloads, for instance, all gif pictures from a specified webpage. Can you do this in VBA?

    I have a database that goes to a few pages automatically to collect some data but so far I´ve had to send keys and stuff like that to select the stuff I want to download.

    Now I know how to find the pages and so on, but I would like some help with the "save *.gif" bit.

    Fuga.

  2. #2
    Junior Member
    Join Date
    Aug 2000
    Location
    CA,USA
    Posts
    17
    Here's one way to save the .gif using an API call. Just specify the URL to the .gif in the argument to the function and an appropriate filepath:


    Private Declare Function URLDownloadToFile Lib "urlmon" Alias _
    "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal _
    szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long

    Option Explicit

    Private Function lDownload(sUrl As String, sPath As String) As Long

    lDownload = URLDownloadToFile(0, sUrl, sPath, 0, 0)

    End Function

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width