Macro to write to Sharepoint folder

Doghouse

New Member
Joined
Mar 3, 2003
Messages
4
Hello all,

I currently have a macro in Excel that automatically writes the file to various places after working its magic, including a shared drive and also to a Sharepoint site. No issues with writing the file as long as we're connected to the network.

We are moving to a new Sharepoint site and I'm having trouble getting the macro to write to the new site. If I navigate to the new Sharepoint site in IE and open the folder in Windows Explorer, the file will write there no problem when we run it. I'm trying to bypass that step so that we don't need to perform that additional step several times per day (multiple folks doing this). I'm thinking I need to pass the authentication through prior to saving, but I'm not finding much out there for guidance.

Here is the structure for how I'm showing the paths:

spath = "\\oldsp\subfolder\subfolder\subfolder\subfolder" 'Path for the old Sharepoint site
ipath = "\\folder\subfolder\subfolder\subfolder\subfolder\subfolder" 'Path for the Shared drive"
tpath = "\\folder.site.com\subfolder\subfolder\subfolder\subfolder" 'new Sharepoint Path

Any suggestions?

Thanks in advance.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
I'ts been a while since I used SharePoint, but maybe if you map the new site as a network drive and then use that as your path reference it might work.
 
Upvote 0

Forum statistics

Threads
1,224,296
Messages
6,177,741
Members
452,797
Latest member
prophet4see

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