Discussion Locked

Creating a document via an Intranet

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have a project in which I need to setup an Intranet area where a user can select from a list of text sections and have a Word document created out of these text sections and placed in an accessible place or even sent to them. I have developed thesite but I am unclear on any method of how to create a link between these files and a single exportable Word document. I have started the conversion of these small text sections to .html but am not sure that this is necessary. Any help on the creation of this site or a point in a direction where any resources regarding this topic would be very much appreciated.

9 replies

by brian

I would recomend some simple ASP scripts. You can get the Dummies book and it will give you samples that can be imitated to perform other basic functions. I interpreted your question to mean that you wanted multiple drop down lists and the selection for each list to be recorded to a file. With asp you can write data to a text file and separate the answers with tabs or commas.
I hope this helps!

by justin.crossman

This is close to what I need, I'll check out ASP scripting. What I currently have is a list of subsections with check boxes that a user would check or not check from and then recieve their document. But I will change formatting for functionality.

by ebob

Exporting to MS Word would (I believe) be rather difficult. You would need to find or develop some sort of API that could develop the formatting of Word.

Of course, you could easily have an app. export the results of your input form(s) to some other, more easily managed file format, including:
- HTML
- plain text
- PDF (using some 3rd party add-ons - see: pdfzone.com, and others)

I quite like PDF, since it's pretty universal, and in general, users are less likely to be tempted to monkey with the content and layout of the finished document.

by jay eckles

You can programmatically interface with a MS Word document in ASP.

One "cheap" way to write to a Word file and then send that file to a client is to write HTML to a plain old text file, then name it with a .doc extension. Then send it to the client using an application/vnd.ms-word or application/msword Content-type. When the client receives it, it will be opened in Word (assuming Word is installed), and they won't see the HTML source, just the formatting - it will be just like a regular Word document. Here's an example:
http://www.codeave.com/asp/code.asp?u_log=142

The "official" answer from Microsoft applies the same approach:
http://support.microsoft.com/directory/article.asp?ID=KB;EN-US;q301044

The "right" way to do it is to use Server.CreateObject to create an OLE Word object and then manipulate the object to add text from the files, etc. You would send the resulting Word document to the client the same way. Unfortunately, I can't find a URL for you right now.Good luck. (remember to remove spaces from URLs above)

Jay Eckles
www.jayeckles.com

This discussion is closed to new replies.