Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

i want to display the contents of uploaded word file into textarea how

Status
Not open for further replies.

prasadalone

Programmer
Aug 15, 2002
87
i want to display the contents of uploaded word file into textarea how to do it please help me
 
could you please explain more on what you are actually trying to do...

-DNG
 
You could start an instance of MSWord using ActiveX/COM automation, open the document with the instance, and copy the text into an ASP variable. Then output the variable in between you opening and closing TEXTAREA tags.

There are 2 problems that I can think of right off the bat:
First is that you will lose all the formatting and fonts and stuff inside the document when you convert it to text like this... the Second is that you have to be really careful starting instances of Word by automation on a web server because, if they are not all shut down properly, you end up with a bunch of copies of winword.exe that never shut down hogging the memory of your web server.
 
1. may be you can put a macro in the word files in order to save them in a format that is readable for asp like *.txt or *.html

Or

2. you can consider save the word file as is, in MS word format in an image in sql server (binary long object on oracle). To send the document back to the client, just change your header with something like this :
Response.AddHeader "MS Word/txt"

-DNG



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top