VBA Code to Download Files from sharepoint to Local Network drive

selvendran

New Member
Joined
Aug 17, 2015
Messages
13
Hi all

I need all of your valued help in creating a macro to download (.xlsm)files from sharepoint folder/sub-folder and save as it is in the given designated local drive folder. Below I have given the sharepoint scenario:-

Sharepoint :

Main Folder > Sub Folder1 > File1.xlsm
> Sub Folder2 > File2.xlsm
> Sub Folder3 > File3.xlsm
> etc....

Likewise each folder has single file in it which needs to be downloaded and saved in the local folder.

Thanks in advance :)
 

Some videos you may like

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

kkazinski

New Member
Joined
Jun 23, 2015
Messages
7
Do a search on URLDownload. There are a number of code examples. Remember your slashes when downloading from sharepoint. https://<path>/<file>.

If you are using a file system object to get a list of files you will need to change the slashes before calling URLDownload.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,177
Messages
5,600,160
Members
414,367
Latest member
dw970906

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top