What's the best way to give the end-user of my web application the ability to open, edit and save (via browser) word documents that are stored in my database?

I have this working by doing an html conversion of the file (via Aspose Words) but this method seems not even close to flawless and i'm trying to improve this. Is integrating with google docs possible/good? Their edition seems awesome and very powerful.

I can't use any Microsoft Word objects (and this is even discouraged by MS).

EDIT: The application is developed in .NET and currently uses the .NET framework 2.0. However, as this is fairly obsolete the idea is to restart from scratch and therefore use the 4.0 framework and C# or VB.

  • Try Google-docs, most probably you would need to save it to storage in Google and read from there. – Yusubov Jul 5 '12 at 13:09
  • 1
    Changing a .NET 2.0 application to a .NET 4.0 application is normally incredibly easy. Why would this require you to start from scratch? – Brian Jul 5 '12 at 13:31
  • The application itself is not as well designed as it should be and there will be some new requirements coming up. Preparing for these changes and trying to make it more robust, the idea was to redesign it and start with the new technologies, reusing the parts that are equal. – seth Jul 5 '12 at 13:57
  • I am looking into the same type of issue (editing documents of various formats on public web), if you get an interesting result, please share. Thanks much. – NoChance Jul 5 '12 at 14:40

You could look into using WebDAV. This is what Sharepoint uses, for example, to achieve this functionality. It basically allows for a URL to act as a hard drive for the purpose of reading/writing files. Alternatively, you could just use Sharepoint for this functionality, but that would require a large amount of customization which isn't the easiest thing to do.

You could use a browser plug-in such as Silverlight or Flash. I have done this via Silverlight using COM interop with Word (as of SL5 this can be done in browser). I'm not sure if Flash has the same capabilities as I'm less familiar with it, but plug-ins have elevated privileges on the user's machine so it should be a lot easier to achieve this functionality.

You could create a client-side WPF application and have it installed on the user's machine via ClickOnce so that it is a fairly seamless experience. We have done this with one of our internal systems and it worked fine. Not sure how well it would work in a public-facing scenario, though.

Most of those options won't work in every browser on every platform. However, since you are targeting MS Word, I'm making an assumption that your goal is not to be 100% standards-compliant to get maximum reach. Most of these solutions will work for a majority of users on the major platforms.

Those options make the most sense if you are on top of a .NET stack already. There are many other potential options. If you give a better idea of what your current technology stack looks like you might get some more specific recommendations.

  • See my edited question please. – seth Jul 5 '12 at 13:20
  • So it looks like my answer is fairly well aligned to your stack. Yes, you might need to upgrade to .NET 4 for some of these options, but that is a simple move from .NET 2 so it shouldn't be a big deal. – RationalGeek Jul 5 '12 at 13:39
  • As far as I could understand, your solutions were targeted to an individual machine. As I'm trying to make this as a web application, it is anything that involves Word COM or installing anything in the user machine (anything with high privileges is also discarded) is not applicable. I'm looking for a solution that can be used in every computer with access to a browser and an internet account. – seth Jul 5 '12 at 14:27
  • If you are looking for something that can be used in every computer with access to a browser, then you should not be looking at Word at all. Just keep the document in Markdown or something which gives the user some limited formatting, such as what Stack Exchange does. – RationalGeek Jul 5 '12 at 18:10
  • BTW, while all of my options do require installing / running something on the user machine, they could all be orchestrated via a web application. I don't think you'll be able to get away from some level of code running on user machine if you want to use Word specifically. – RationalGeek Jul 5 '12 at 18:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.