[AccessD] Downloading Web File Automatically

William Benson vbacreations at gmail.com
Mon Nov 19 18:02:29 CST 2012


Hi guys / gals what happens if there is a security check in the mean time
requiring login with usermame (SSO, e.g.) and password? does the code below
break or just wait patiently?

...grabled by smrat phonn as ususl
On Nov 14, 2012 5:05 PM, "Stuart McLachlan" <stuart at lexacorp.com.pg> wrote:

> 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
>


More information about the AccessD mailing list