在 MS Access 中链接 SharePoint 视图

Linking a SharePoint View in MS Access

使用我在这里找到的代码:https://accessexperts.com/blog/2011/07/07/sharepoint-lists-and-microsoftaccess/

我已将以下代码用于 Link Access 中的 SharePoint 视图:

DoCmd.TransferSharePointList acLinkSharePointList, "http:\serversite", _
"{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}", _ 'Sharepoint List GUID
"{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}", _ 'SharePoint View GUID
"tblMyList", True

这段代码在我过去使用 AC2010 时对我有用(不确定我使用的是哪个版本的 SP)。我目前正在使用 Access Microsoft 365 MSO(版本 2202 Build 16.0.14931.20128)64 位和 SharePoint Online,上面的代码不起作用。

By 不起作用,我的意思是代码执行没有错误,但它没有 link 视图。

有什么想法吗?

我偶然发现了答案。在其中一条评论中,作者回答了一个问题:

Blockquote The hard part is that URLs for lists can vary depending on whether you are using a company’s SharePoint server or a hosted SharePoint, how it is placed in the overall structure and other factors. Also, consider that you have sufficient permissions to actually view the required page. If you are not an administrator, you may need to ask whoever administrate the site to tell you the GUID for the list.

假设您有足够的权限,这里有一个方法可以查明:

  1. 打开网络浏览器
  2. 使用以下 URL:

//_layouts/viewlsts.aspx

将 替换为您的 SharePoint 域和包含您需要的列表的站点的完整路径。例如,假设您有一个 Office 365 站点,它可能看起来像这样:

https://mycompanyname.sharepoint.com/sites/mysite/_layouts/viewlsts.aspx

Blockquote

一旦我用 /_layouts/viewlists.aspx 修改了我的路径名,一切就完美地联系起来了。