SharePoint Asked by Leroy on January 11, 2021
I have tried using the below code to upload a document to SharePoint Online (Sourced from this answer)
Dim SharepointAddress As String
Dim LocalAddress As String
Dim objNet As Object
Dim FS As Object
' Where you will enter Sharepoint location path
SharepointAddress = "\sharepoint path to document library" & ""
' Where you will enter the file path, ex: Excel file
LocalAddress = "H:/test.gif"
Set objNet = CreateObject("WScript.Network")
Set FS = CreateObject("Scripting.FileSystemObject")
If FS.FileExists(LocalAddress) Then
FS.CopyFile LocalAddress, SharepointAddress
End If
Set objNet = Nothing
Set FS = Nothing
I have signed in to the SharePoint Online site using my work credentials and then navigated to the library and copied the address from the URL bar to paste into the above code, however when I try to run the procedure I am getting an error message saying Run Time Error 76: Path not found
Does anyone know what I am doing wrong? Thanks
Try mapping the SharePoint library to a drive letter on your system and see if that works. How to Map SharePoint Document Libraries as Network Drives Also, you can get some great information from VbaA2z videos here VBA and SharePoint.
Answered by Tecrms on January 11, 2021
1 Asked on December 17, 2020 by kailash-sahoo
2 Asked on December 16, 2020 by brandon-black
0 Asked on December 14, 2020 by sunil-jogi
1 Asked on December 13, 2020 by frank-bertucci
3 Asked on December 13, 2020 by gsd-sharepoint
2 Asked on December 10, 2020 by simon1608
calculated column calculated column formula sharepoint online
1 Asked on December 10, 2020 by mannaggia
1 Asked on December 10, 2020 by ergec
1 Asked on December 9, 2020 by splearner
1 Asked on December 8, 2020 by user92386
1 Asked on December 8, 2020 by jitender-singh-tomar
1 Asked on December 8, 2020 by neberu
2 Asked on December 5, 2020 by d-d
2 Asked on December 4, 2020 by emaborsa
1 Asked on December 4, 2020 by kumar
Get help from others!
Recent Questions
Recent Answers
© 2023 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP