David Emerson
newsgrps at dalyn.co.nz
Thu Nov 15 21:58:05 CST 2012
Thanks Gustav and Stuart. Your suggestion worked perfectly. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Thursday, 15 November 2012 11:04 a.m. To: Access Developers discussion and problem solving Subject: Re: [AccessD] Downloading Web File Automatically Even better - A way to automate this in Access which doesn't need to invole a browser. 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 Public Function DownloadFile(URL As String, LocalFilename As String) As Boolean Dim lngRetVal As Long lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0) If lngRetVal = 0 Then DownloadFile = True End Function -- Stuart On 15 Nov 2012 at 9:40, David Emerson wrote: > Team, > > I have an application that imports a csv file. The file is put up onto a > web site url. Entering the url in a browser will trigger downloading the > file. > > Is there a way to automate this in Access. Ie send the url to a browser, > have the file downloaded to a defined folder where it can then be imported? > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com