Hi Am developing a small search engine kind of application. It searches for contents in word documents. I need to implemen开发者_StackOverflowt a "view as html" option as in gmail. When I click the link to the doc, it should open as a html page in a new browser. Is there any way to achieve this?
I was able to open the word doc in an iframe, but that does not suit my purpose.
My application uses Asp.Net and C#. Any help would be appreciated.
Regards
Vignesh
The easy, slow, memory-intensive, unscalable, unscalable (needs to be said twice) way of doing it would be to use the office COM API to load the file and save it as html (or text actually since all you want to do is a search on it), but I really doubt you can pull this off in even a moderately used web site.
Throwing that aside, you're left with open source parsers or using the IFilter
interface to do it. I found an example of the latter: http://www.neowin.net/forum/topic/316480-reading-text-from-ms-word-files-in-c
精彩评论