5
votes

I'm making a web app. Part of it includes the automatic generation of word documents (letters). Those documents need to be opened by the end user, then saved back to the server once they've finished editing.

I tried using webdav for this but the only browser I could actually launch word from (using active-x) was IE. I also found a plugin for firefox, but for Chrome I couldn't find a way that worked.

Next I thought about making the clients map a drive to webdav (or similar), then offering up the files as file://... links, but that only works if the webpage is on the local machine.

Before I resort to ditching word (the clients won't like this) and using CKEditor or TinyMCE, is there another way?

In short, I'd like to have links to a document on the page, which when clicked are opened in word, but the file should stay remote - and then when saving, it's the remote file that gets updated.

I've also looked at Zoho but it could be very expensive for this project, plus I don't think it can be white-labelled and also looks a bit old fashioned, UI wise.

Maybe Sharepoint can do what I need? Haven't looked at that much. Also thought of making a client app to run in the system tray and deal with things.

If there was a decent way of editing Word docs from within the browser with something like CKEditor/TinyMCE and once finished, conversion back to Word format actually worked 100%, that would suffice.

I'm open to totally fresh ideas if anyone has any...

3
I have done some RND on this problem and came with one workaround. follow this link for steps and code implementation. http:// steptodotnet.blogspot.com/2012/ how-to-edit-word-document- using-aspnet.html Here you will get code and complete steps also.Jitendra Faye

3 Answers

1
votes

Currently Chrome, Firefox and Safari support MS Office plugin. They can open and save documents directly to server. I have tested this with MS Office 2007 and MS Office 2007 just about a month ago.

0
votes

Ideally, your users would be able to use Word natively. Is there any chance you could create an Office Add-In that hooks into the BeforeDocumentSave event, looks for some indicator that the file is associated with your application, and save the updated file to your server?

Saving to the server via the Word Add-In would probably need to include some unique identifier (in addition to file name), so you could overwrite the previous version server-side. Then, if you were using something like SignalR, you could trigger a refresh on the web page when the file was saved successfully (assuming they were still on that web page) on the server (via FileSystemWatcher).

0
votes

Had same problem myself.

I solved it by setting up a webdav share on the server with digest authentication (SabreDAV), and tied it into the users table on my app backend.

In relation to the client end, I solved accessing this by creating a small java applet which uses the java Desktop class (getDesktop().open()) to open the file. You will need to make sure the path is handled right for the client machine type (Windows, OS X or Linux)

You will also need to get your end users to permanently mount or map the webdav share locally.