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!

Word Docs from Asp.Net

Status
Not open for further replies.

jerasi

Programmer
Jun 19, 2000
141
CA
Hello,
I'm trying to find a way to extract text from an uploaded word document without having ms word install on the web server.
The application is hosted by a web hosting company and they don't want ms word installed on the server (can't blame them)
Is there any way to extract text from word docs without utilizing ms word? Note: I can't install any third party controls.
Thank you.
 
jerasi - anyway you can abandon Word for a text file? Have you dont a search at Google "Groups" using say, "ASP.NET + Word", etc? Try a straightaway as well and also search here at Tek-Tips. My guess is that you could probably open up the Word perhaps as a text and do your string search, etc. There was a recent post in the last few days on this same topic but it involved php - you might scroll down to the next page or two (it was about 1 week ago).
 
jerasi, I am a little confused on your post.. you say you want to open a word doc that is stored on a server? if so just create a link button to the file.

you don't need word on the server, the client must have word but not the server.

if your trying to export the html page to word this is very easy and straight forward.

ContentType = "application/ms-word"
FileExtension = ".doc"

I personally use pdf but pdf excel or word, it's all the same to the app.

look at this link.

 
Thank you for your posts.
What I'm looking to accomplish is this:
1. User uploads their signature file (word doc)
2. Server saves the signature file in a specific directory for later retrieval
3. Server extracts the text from the word doc
4. Server insert the extracted text to the SQL server under the user's profile

Is there anyway to accomplish this without having MS Word installed on the server? I'm looking for a solution where I can just add a reference to some control and that will enable me to do the text extraction.
Thank you.
 
jerasi said:
3. Server extracts the text from the word doc

my question would be..how is the server going to know what text to extract?

you don't need word installed on the server. basically what your trying to do is cut and paste text from a word doc stored in a file on one of your servers correct?

if so, I don't see how your going to be able to do this without opening the word doc on the users system then letting them cut and paste the text into a textbox then inserting that text into your sql DB. remember, in order to run an insert statement you need some kind of parameters(like text in a textbox) I guess maybe you could use a session or cache somehow.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top