Hello. I wrote some VBA code in an Excel sheet with the intention of copying to SharePoint some managed files inside this sheet. Before I even confirm if the code works, I received an error message inviting me to add the SharePoint site to the trusted websites, and so I did. But then a second message appeared, which I am attaching here and I translate it from Italian:
"Run-time error '-2147024672 (800700e0)': Automation error Access denied. Before opening files in this path, you must add the website to the list of trusted sites, go to the website and select the automatic login option."
But I don't understand when says to go to the website (therefore to the SharePoint site) and set the "automatic login"... what does this mean? I tried to automate the credentials login but obviously this is not what it was referring to. Is there any configuration to set up automatic login that eludes me?
If it can be useful, I also enter the VBA code used:
Dim FSO As Object
Dim FromPath As String
Dim ToPath As String
ToPath = "\\MYSITE.sharepoint.com@SSL\DavWWWRoot\sites\SITESNAME\"
FromPath = "C:\Users\MYNAME\Desktop\Test"
Set FSO = CreateObject("scripting.filesystemobject")
FSO.CopyFolder Source:=FromPath, Destination:=ToPath