Possible for Word to edit documents directly off a

2019-02-27 14:31发布

问题:

I have a use case that seems pretty simple, but after Googling around I can't find a solution. I have some Word documents on an FTP server and I'd like to be able to create a link that would download them into Word and then allow the saved changes to be sent back to the FTP server.

The problem is that I can only get Word to either open the file from the FTP server as read-only and I can't save the changes back to the server automatically, or the file downloads to a temporary location which isn't automatically saved back to the server. I'm creating my link like this:

<a href="ftp://ftp.example.com/www/uploads/Image/test.doc">Test</a>

Frustratingly, if I go into Word File|Open and paste the link "ftp://ftp.example.com/www/uploads/Image/test.doc" I can save back to the server. What gives? Is there a solution? From Googling around it seems that Sharepoint offers this ability, but that's not practical for us. We're using IE7 and Office 2003.

回答1:

I believe Microsoft Word can read / write WebDAV - see this question:

Editable Word Document from JSP

Can you set up some kind of proxy that can connect via FTP?



回答2:

Read this link http://www.webdavsystem.com/server/documentation/ms_office_read_only (is actually about webdav, but I'd guess this is the same issue for FTP), there is a section on on opening weblinked documents in non-readonly mode. Which needs some changes on the client side...

HTH Tim



回答3:

Solution for IE: Put a file on ajaxbrowser.com (this is WebDAV Server for testing) and replace file's full path in the next code:

var openDocumentsObject = new ActiveXObject("SharePoint.OpenDocuments");
openDocumentsObject.EditDocument('http://ajaxbrowser.com/mydoc.docx');

Another example:

<a href='http://ajaxbrowser.com/mydoc.docx' id='urltarget' target='_blank'>Edit through URI</a>