I'm trying to open and manipulate a SharePoint Excel file but am having trouble referencing it correctly in the first place.
I've used the simple code below. Firstly, I've taken the second solution from here to convert a shareable SharePoint link into a WebDAV link, then inserted this below.
I receive a run-time error 1004, "Application-defined or object-defined error". The original sharing link I have works correctly in a browser. The WebDAV link doesn't work in a browser or in Windows Explorer, even reducing it to just access the folder, rather than the file itself....
Does anyone have any ideas what could be causing this/other ways to achieve the same goal?
Thanks!
Note: The link below is a dummy link just to show syntax
Sub OpenSharepointSharingLink2()
Dim wb As Workbook
'Open Excel File.
Set wb = Workbooks.Open("\\company.sharepoint.com@ssl\:x:\s\Folder\CBaAYOw2mKBDoiFTT3680dUBUHl6F2aGa9Cw_dHNaB4zwQ?e=zQeEEQ")
End Sub