0
當我使用下面的代碼時,沒有文件被複制到sharepoint,但代碼不顯示錯誤。有人可以幫我嗎?將文件上傳到分享點:VBA
Dim SharepointAddress As String
Dim LocalAddress As String
Dim objNet As Object
Dim FS As Object
SharepointAddress= "\\xxxx\sites\xxx\xxx"
' Where you will enter your location path
LocalAddress = "yourfile path\test.xlsx"
' Where you will enter the file path, e.g.: Excel file
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
有人可以建議一些替代方法,或幫我解決這個查詢 – user1553562
如果不拋出一個錯誤,你確定你正在使用正確的道路? –
是benno..the文件路徑是正確的..我需要指定文件的名稱,同時給予本地地址路徑? – user1553562