我正在尝试将我的C盘文件夹上传到SharePoint库站点。我已经使用了以下代码,当ToPath不是一个SharePoint库站点而是来自我的C驱动器的另一个文件夹时,它运行良好。我错在哪里呢?
Sub AddSharePointFiles()
Dim FSO As Object
Dim FromPath As String
Dim ToPath As String
ToPath = "https://share.name.com/site/folder/_layouts/15/start.aspx#/LibraryName/Forms/AllItems.aspx"
FromPath = "C:\Users\Name\Documents\FolderName"
Set FSO = CreateObject("scripting.filesystemobject")
FSO.CopyFile Source:=FromPath, Destination:=ToPath
End Sub
感谢您!