MS Word 在 Windows Vista 和 7 上以只读方式打开 WebDav 共享上托管的文档,但前提是没有打开其他 webdav 连接
我们有一个 WebDav 服务器,上面有一些 Word 文档。 (我们正在使用 PHP 的 HTTP_WebDAV_Server 但在使用 Apache mod_dav 进行测试时遇到相同的问题 - 两者都使用摘要身份验证,基本身份验证在 Vista 或更高版本上不起作用)
我们有一个网页,可以使用 JavaScript 打开 Word 文档,例如:
Doc = new ActiveXObject("Sharepoint.OpenDocuments.3");
Doc.EditDocument(url, 'Word.Document');
这会导致 Word 连接到 WebDav 服务器并打开文档,绕过 IE 和大多数内置于 WebDav 客户端的 Windows。在 Windows XP 上,此功能完美运行,并且(在提示您登录后)允许您编辑 Word 文档并将其保存回服务器。在 Windows 7 和 Windows Vista 上,这通常会以只读方式打开文档,但并非在所有情况下都如此。
经过相当多的尝试和错误后,我们发现如果 Explorer 碰巧已经连接到 WebDav 服务器,它就可以工作(即打开读/写)。请注意,这适用于任何 Webdav 服务器,但不一定适用于包含您尝试编辑的文档的服务器。
因此,除了告诉我们的用户更改其计算机上的设置之外,我们还可以在 javascript sharepoint 调用中或在 WebDav 服务器上执行任何操作来解决此问题。
我们使用的是 MS Word 2007
。当从系统的 HTA 文件版本启动 Word 时,我们遇到同样的问题,使用 javascript:
wordApp = new ActiveXObject("Word.application");
wordApp.Visible = true;
doc = wordApp.Documents.Open(url);
Pps。抱歉,如果您认为这个问题应该放在 Serverfault(甚至 SuperUser)上。我无法决定,但因为我们正在自己编写 WebDav 服务器(用 PHP),并且我在这个网站上比其他网站有更多的代表,所以我决定将其发布在这里:-)
We have a WebDav server with some Word documents on it. (We are using PHP's HTTP_WebDAV_Server but get the same issue on tests with Apache mod_dav - both use digest authentication, basic auth doesn't work on Vista or later)
We have a web page that opens the word documents using javascript like:
Doc = new ActiveXObject("Sharepoint.OpenDocuments.3");
Doc.EditDocument(url, 'Word.Document');
which causes word to connect to the webdav server and open the document, bypassing IE and most of windows built in WebDav client. On Windows XP, this works perfectly, and (after prompting you to log in) allows you to edit the word document and save it back to the server. On Windows 7 and Windows Vista, this usually opens the document read only, but not in all cases.
After quite a bit of trial and error, we found that it worked (i.e. opened read/write) if Explorer happened to be already connected to a WebDav server. Note that this works with any Webdav server, not neccesarily the one with the document that you are trying to edit.
So other than telling our users to change settings on their machine, is there anything we can do in the javascript sharepoint call, or on the WebDav server that will fix this issue.
We are using MS Word 2007.
Ps. We have the same problem when launching Word from an HTA file version of our system, with javascript like:
wordApp = new ActiveXObject("Word.application");
wordApp.Visible = true;
doc = wordApp.Documents.Open(url);
Pps. Sorry if you think this question should be on Serverfault (or even SuperUser). I couldn't decide, but because we are programming the WebDav server ourself (in PHP) and I have more rep on this site than the others, I decided to post it here :-)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论