情况: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.pptx
和
https://***.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/