MS Word opens documents hosted on WebDav share read-only on Windows Vista and 7 but only if no other webdav connections are open

南笙酒味 提交于 2019-12-10 17:45:19

问题


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 :-)

来源:https://stackoverflow.com/questions/2999450/ms-word-opens-documents-hosted-on-webdav-share-read-only-on-windows-vista-and-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!