Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Feb 2001
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Downloading a Word/Excel File from the Web w/ VBA (Excel 2000SR1)

    Hello,

    I would like to keep a few files stored on a web location where the users could download them. The most current version of the files would always be on the web. Since the master version will always be available, I would like to add a VBA procedure that can check the date of the file on the web and compare it to date of the file on the local drive. If they are not the same, I would like for the user to be able to just click a button to download the current version.

    Is this possible? And if so, how difficult is it to accomplish?

    Thanks,

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Downloading a Word/Excel File from the Web w/ VBA (Excel 2000SR1)

    Word and Excel documents can access their own "last modified" date/time through VBA in the document/workbook. You could create an AutoOpen macro in the file to check the internal date against the date of the file on the hard drive (e.g., using the FileSystemObject). If you don't have a standard location for the local copy of the document, this could be a challenge.

    This might be easier than trying to do it the other way: requesting the file timestamp from the web server. But maybe that's easier than I think??

  3. #3
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Dallas plus 20 miles or so, Texas, USA
    Posts
    876
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Downloading a Word/Excel File from the Web w/ VBA (Excel 2000SR1)

    Assuming that the file on the web would always be the most current version, why not use an ftp program and schedule the download every day? or every hour? or whenever you want? With some ftp programs, you set to only download if file size is different, although this may not necessarily make sure the user has the most recent version.

    Not sure about Word, but Excel has some neat things you can do with a web query, although this might not suit your needs.

Posting Permissions

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