gpt4 book ai didi

c# - Microsoft Office 文档显示 Sharepoint URL 而不是本地

转载 作者:太空狗 更新时间:2023-10-30 01:18:28 24 4
gpt4 key购买 nike

情况:OneDrive for Business 将文件从 Sharepoint 站点文档库同步到本地目录:

C:\Users\users\Sharepoint\Library\Test.pttx

但是使用 PowerPoint InterOp 时:

presentation.Path

是:

https://company.sharepoint.com/Library/Shared%20Documents/

Sharepoint 的正确路径是什么。

如何访问本地目录?

更新:我找到了一个 similar question在 MSDN 上但没有答案

最佳答案

根据这个post ,可以在这个多字符串注册表值中查找已同步的文件夹:

HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Common
\Internet\LocalSyncClientDiskLocation

鉴于您的本地路径和 SharePoint URL 看起来像

C:\Users\User\SharePoint\Library - Documents\Folder\SubFolder\Document.pptxhttps://***.sharepoint.com/Library/Shared%20Documents/Folder/SubFolder/Document.pptx,

您可以尝试从 URL 中提取本地部分 Folder/SubFolder/Document.pptx,将其添加到从注册表值检索的本地文件夹路径中并检查文件是否存在。

关于c# - Microsoft Office 文档显示 Sharepoint URL 而不是本地,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27353322/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com