View Full Version : Use an asp page to open a MS Word file

09-11-2005, 11:25 PM
How can I code asp to open a MS Word file that has been linked to an Access Databse to populate itself with address labels. The users can add, edit and delete users from their address database from the online asp pages. They all have MS Word on the workstations and the template.doc will be available on the server. So as long as I can get the Asp page to open word they can open the template and have it populated no matter what workstation they are at. Thanks


09-12-2005, 05:53 PM
Not quite sure what your server setup is or how you want it to open, but you have a few options depending on what you need.
1. Direct link to the doc.
2. User clicks link, app gets file (filesystemobject) and streams it as application (content type)
3. CreateObject and direct manipulate it, then serve it.

09-12-2005, 11:43 PM
Can you explain 2 and maybe 3 to me. If you don't mind. :)


09-12-2005, 11:56 PM
1. Will work if all they need is the word document and it is available in a public place the web server knows of.
2. Same as #1, except the file is stored somewhere the user cannot get to. i.e. file download.
3. For use when the server has to do something with it first. After re-reading your first post, this is not what you need, since you said they have a local copy of the DB/Access file.

So, the question is, is the template stored where the web server can serve it, or is it in the file system?
If in the file system, you need to do a file download type thing (#2).
I have one of those in C# for Excel templates we use. I could post code if you need it as an example. Pretty simple, though. I googled file downloads, got a java sample, and made it with C#. :)