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

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
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.
 
Upvote 0

Forum statistics

Threads
1,213,496
Messages
6,113,993
Members
448,539
Latest member
alex78

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