I am trying to download a file from Sharepoint with VBA and can not figure out how to do it! The file is actually a picture (not sure if that matters?) and the download goe
Here is the wrapper code I currently use to download files from our Sharepoint site:
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
Function DownloadFileFromWeb(strURL As String, strSavePath As String) As Long
' strSavePath includes filename
DownloadFileFromWeb = URLDownloadToFile(0, strURL, strSavePath, 0, 0)
End Function
The function DownloadFileFromWeb returns 0 if the download was successful.