用于将项添加到SharePoint联机列表的vba脚本 [英] vba script to add items to SharePoint online list

查看:86
本文介绍了用于将项添加到SharePoint联机列表的vba脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述






我有一个vba脚本,它从outlook中捕获用户输入并更新excel表。





我希望vba脚本写入SharePoint在线站点的共享点列表。





请告诉我们如何实现这一功能。





任何链接都会有所帮助。





提前致谢,



Hepsi

解决方案


尝试将文件从本地复制到SharePoint网络文件夹,您可以查看下面的线程以获取详细信息。

 Dim SharepointAddress As String 
Dim LocalAddress As String
Dim objNet As Object
Dim FS As Object

SharepointAddress =" \\mysite.sharepoint.com\ites \xyz-uat\a1docsuat"&" \"'您将在何处输入您的位置路径
LocalAddress ="您的文件路径'''您将在何处输入文件路径,例如:Excel文件
设置objNet = CreateObject(" WScript.Network")
设置FS = CreateObject(" Scripting.FileSystemObject")
如果FS.FileExists(LocalAddress)则
FS。 CopyFile LocalAddress,SharepointAddress
End if
Set objNet = Nothing
Set FS = Nothing



https://www.experts-exchange.com/questions/28624655/Excel-VBA-code-to-upload-a-file-to-SharePoint-Online。 html#a40640773


 


最好的问候,



Hi,

I have a vba script which captures the user input from the outlook and updates an excel sheet.

I want the vba script to write into a sharepoint list in a SharePoint online site.

Please let me know how to achieve this functionality.

Any links will be helpful.

Thanks in advance,

Hepsi

解决方案

Hi,

Try to copy the file from local to SharePoint network folder, you could check below thread for details.

Dim SharepointAddress As String
Dim LocalAddress As String
Dim objNet As Object
Dim FS As Object

SharepointAddress = "\\mysite.sharepoint.com\sites\xyz-uat\a1docsuat"  & "\"          ' Where you will enter your location path
LocalAddress = "your file path"                                      ' Where you will enter the file path, ex: 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

https://www.experts-exchange.com/questions/28624655/Excel-VBA-code-to-upload-a-file-to-SharePoint-Online.html#a40640773

 

Best Regards,

Lee


这篇关于用于将项添加到SharePoint联机列表的vba脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆