1

Can someone explain this strange (or normal) behaviour: I've got a WebDAV directory. In this folder, I have a word document, called document.doc.

When I open Word, and then choose "Open File" and fill in the whole URL, http://server/webdav/document.doc, Word will open the document just fine. Changes I make are being saved on save click.

Now, when I make a HTML page with an anchor to this document like this:

<a href="http://server/webdav/document.doc">Edit document</a>

It will open the document just fine, but opens in Read-Only mode!

Investigation suggests that when you use Word to open the file, it will also function as WebDav client. So it will send the appropriate headers to lock the file etc. Calling it from an anchor, lets your browser do the GET. Then it will pass the document (downloaded??) to Word. Word does some HTTP calls on the file, but no LOCK and so.

Does anyone have any idea how I can solve this? I could write some PHP code to do the HTTP calls and so, but how do I get it in Word then?

Berkay Turancı
  • 3,373
  • 4
  • 32
  • 45
  • I've been struggling with this same problem. I am using ActiveXObject in our javascript for our IE clients. We are serving up Word files from our database so we've implemented a WebDav server with the LOCK/UNLOCK/PROPFIND/etc methods supported. This used to work and now it has stopped which is why it is so confusing/difficult for us. – Peter Delaney Sep 21 '15 at 18:31

3 Answers3

1

I wouldn't expect this to be possible. When you open it through your web-browser, you're first downloading a copy that's then stored in a temp folder and then handed to word. What you're looking for is having word open the document. Hence, what you would need to do is have the link open up word and pass it a parameter. A very nasty hack would be to have php generate files readable by word that make it open the desired webdav-document. You could do this with macros, but a) you'd need to lower your macro security settings in word and b) you'd never be able to rely on others having done this (hence, it's just a solution for you).

Fake51
  • 525
  • 4
  • 12
1

See this question. Basically you use a bit of Javascript that calls an ActiveX object that is part of Microsoft Sharepoint.

Community
  • 1
  • 1
rjmunro
  • 27,203
  • 20
  • 110
  • 132
0

IIRC, Confluence (Atlassian) has a WebDav add-in for Firefox that accomplishes this (opening a doc in Word in WebDav mode by clicking on a link in the browser). Not sure how it's done, however.

Gullbyrd
  • 1,545
  • 1
  • 16
  • 14