如何创建强制 MS Word 在 webdav 服务器上编辑文档的 HTML 链接

发布于 2024-07-16 03:31:28 字数 266 浏览 5 评论 0原文

假设我有启用 WebDAV 的服务器,其中有一堆 Office 文档。 我想生成包含文档链接的网页,以便单击该链接将打开 Microsoft Word。 Word 会依次从 WebDAV 服务器下载文档,当用户完成文档编辑时,MS Word 会将其上传回来。

我知道 MS Word(和其他 Office 程序)支持编辑存储在 WebDAV 服务器上的文档。 我不知道的是如何生成链接来触发 MS Word 自行下载该文档。

是否可以? 也许使用一些特殊的方案?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

白昼 2024-07-23 03:31:28

嗯,你也可以使用这样的东西:

<a href="ms-word:ofe|u|http://some_WebDav_enabled_address.com/some_Word_document.docx">Open Document in Word</a>

与上面答案的区别是,这不再需要 ActiveX,它至少可以在 IE 8+、Chrome 和 Firefox 中工作,只要它是从 Windows 机器打开的,对于 Office 2010+(不过对此不是 100% 确定)。

说明:ms-word:ofe 部分是安装 Office 时安装在客户端计算机上的协议。 我不知道 |u| 部分的确切作用。

Ummm, you could also use something like this:

<a href="ms-word:ofe|u|http://some_WebDav_enabled_address.com/some_Word_document.docx">Open Document in Word</a>

The difference from the above answers is that this would no longer require ActiveX and it will work at least in IE 8+, Chrome and Firefox, as long as it is opened from a Windows machine, for Office 2010+ (not 100% sure about this one though).

Explanation: the ms-word:ofe part is a protocol that gets installed on the client machine when Office is installed. I don't know exactly what the |u| part does.

夏有森光若流苏 2024-07-23 03:31:28

Confluence 使用 SharePoint.OpenDocuments ActiveX 控件的 EditDocument 方法。

JavaScript 中的示例:

new ActiveXObject("SharePoint.OpenDocuments.1").EditDocument("http://example.com/test.doc")

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")
天冷不及心凉 2024-07-23 03:31:28

据我记得,实现此目的的唯一方法是通过 ActiveX 显式实例化 Word,并向其传递要打开的 URL。

这可以在 HTML 页面内完成(其中需要 IE),或者使用外部应用程序,然后需要注册新的 mime 类型(请参阅 http://greenbytes.de/tech/webdav/rfc4709.html#rfc.section.B.1 的一个例子)。

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

情归归情 2024-07-23 03:31:28

我发现 Confluence 可以做到这一点。 他们有特殊的 Firefox 插件,但它应该可以与 Internet Explorer 一起正常工作。

事实上,当我开始使用它时,发现 IE 实际上是直接从 WebDAV 打开文档。 看起来好像 IE 下载了该页面,并将其传递给 MS Word,但与 URL 一起传递。 然后,MS Word 可以将文件保存回来(好吧,有时它会将文件视为只读,并且不允许保存回来,但允许以不同的名称上传)。

仍在调查中。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文