Opening Word Doc via Browser???

Posted on 1997-12-04
Last Modified: 2013-12-25
I am developing a Web app that, among other things, needs to allow the user to manage a set of Word documents that resides on the web server.  Does anyone know of a way to open a Word Document that resides on a WEB Server in Word via the browser and allow the user to edit the document and save it back to WEB Server exactly where it came from?   If I just put a link to the document on a page, one of two things happens:

    - If I am set up to have the browser use the Word Viewer, the document opens in the viewer and the user can only do a Save As but, since the browser is pulling the doc from cache, there is no indication of where the document initially came from so the user is forced to be intelligent about the location of the document. 

    - If I am set up to have the browser use Word, the document opens in a seperate window in Word and the user can do a Save but, again, there is no indication of where the document initially came from so the user is forced to be intelligent about the location of the document. 

All I want is for the user to be able to click on a link to the document, open it, edit it and save it back to the location it came from without having to really know the physical location of the document.  Users will be using IE4.  I am currently using ASP pages to develop the application.  Any help, sample code, ideas, etc would be appreciated.
Question by:szvx4x

Accepted Solution

jshamlin earned 200 total points
ID: 1855789
With current technology, you're pretty much (but not entirely) stuck: Web servers aren't designed to allow users to manipulate files remotely, not in the way you're describing (as if the files were on a LAN drive).  

Some applications (like FrontPage) will allow users to imitate this kind of interactivity indirectly - all edits are made to the document locally, generally in RAM, and when the user selects "save," the edited file is sent to the Web server via FTP.  But to do this, you have to open the document in the FrontPage editor - *not* through the Web browser.

The latest version of Word (Word97) has similar capabilities - when you open a file, the "Look In" box has an option for Internet Locations (FTP) - the user will need to enter server, username, and password, just as for a normal FTP connection, but can then "Save" the document to the Web server.  However, like FrontPage, this can't be done by clicking a link in a Web browser - it must be done by opening the document using Word itself.

And so, what you'll need to do is set up a "public" directory on your server, for which you can provide a username/password pair and instructions for opening the server-housed documents in Word.  

This will give you the functionality you desire, though it's not quite as convenient.  To have the process work seamlessly, you're largely at the mercy of developers -  a "seamless transition" will have to be built into the Web browser (and possibly the word processign application), so that there are client-side capabilities for passing FTP information from Web Page to Word.  Alternately, if Word is ever migrated to Java, it should be able to run inside a Web browser, which will give you the ability to pass the requisite information as parameters.

Both of these things are pretty futuristic, but they'd both be acutely useful, and would make both Word and IE more useful for intranet customers, which in turn would make both applications more popular.  It's probably something that will eventually happen, because it means more money for Bill ... sometimes, greed's a good thing <g>.

Until then, you'll have to take the long way.

Expert Comment

ID: 1855790
Another thing that you could look into, I only have a basic idea and have never tried it, but may be able to provide you with the more seamless transition that you are looking for.
Build an ActiveX control that first downloads the document to the user's machine.  Second uses the local copy on data to display the word document in a Rich Text Box.  Third have various controls in this control that can do the bold, font size, color, etc (whatever will be needed by the uses).  Also have a save button.  This Save button will know the location on the server of the word document, also the user name and password to ftp it to the server.

This idea is basically what jshamlin suggested, with some more work (on your part) to make it work the way you inteaded.  One advantage of this is that if people are modifing the same document that you could use Date/Time stamps with the file to make sure someone doesn't overwright somebody's else's changes.

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question