views:

1313

answers:

4

Let's suppose that I have WebDAV-enabled server, where I have bunch of Office documents. I'd like to generate webpage which has link to document such that clicking on the link will open Microsoft Word. Word will in turn download document from WebDAV server, and when user finishes editing document, MS Word will upload it back.

I know that MS Word (and other Office programs) support editing of documents stored on WebDAV server. What I don't know, is how to generate link which will trigger MS Word to download this document by itself.

Is it possible? Maybe using some special scheme?

A: 

As far as I recall, the only way to achieve this is to explicitly instantiate Word through ActiveX, and the pass it the URL to open.

This can be done inside the HTML page (in which it'll need IE), or using an external application that then would need to be registered for a new mime type (see http://greenbytes.de/tech/webdav/rfc4709.html#rfc.section.B.1 for an example).

Julian Reschke
Julian, as a spec author, you probably know if there are any clients supporting Mounting Webdav Servers out of the box?
Peter Štibraný
The Xythos client does. And the spec already contains the code to make it happen with the Microsoft webfolder client,It would be nice to have a matching implementation for MacOS X; shouldn't be too hard...
Julian Reschke
A: 

I found that Confluence can do this. They have special Firefox plugin, but it should work fine with Internet Explorer.

In fact, when I started to play with it, it turned out that IE does actually opening document directly from WebDAV. It seems like if IE downloaded the page, passed it to MS Word, but together with URL. MS Word can then save file back (well, sometimes it sees the file as read-only, and doesn't allow to save back, but allows to upload under different name).

Still investigating.

Peter Štibraný
When you say "sometimes it sees the file as read-only" did you get anywhere on this? I've posted another question on a similar issue: http://stackoverflow.com/questions/2999450/ms-word-opens-documents-hosted-on-webdav-share-read-only-on-windows-vista-and-7-b
rjmunro
@rjmunro: unfortunately no ... we didn't use ActiveX/plugins technique for opening MS Word after all.
Peter Štibraný
+4  A: 

Confluence uses the EditDocument method of the SharePoint.OpenDocuments ActiveX control.

Example in Javascript:

new ActiveXObject("SharePoint.OpenDocuments.1").EditDocument("http://example.com/test.doc")
Arne de Bruijn
This worked like a charm for us with IE6/IE8
akiro
A: 

You can do this with JavaScript:

var s = new ActiveXObject("SharePoint.OpenDocuments"); 
var fRet = s.EditDocument("http://webdavserver.com/path/document.docx");

The SharePoint.OpenDocuments ActiveX is installed with Microsoft Office 2007 and works only with Internet Explorer. There is not any solution for other browsers (without installing plugins).

Even using the above ActiveX you can get the document opened in read-only mode. For example if your WebDAV server is non-root or if it does not support Class 2. Here is the comprehensive document about this: http://www.webdavsystem.com/server/documentation/ms_office_read_only