views:

136

answers:

2

I want to display a Word document in my ASP.NET page, and I want to be able to highlight text in the document according to events that happen on the page (like button clicks).

Is it possible?

Thanks.

A: 

Everything is possible but it may require some work - one idea might be to use automation on the server side to read the document and then display a page that contains the content of that document and allow some easy reading/editing that on the server side would again use automation to update the document. It's possible something like this is ready implemented and waiting but it also shouldn't be too hard to do yourself.

RnR
Have you checked the licensing involved in installing Word on the server? It is incredibly expensive, because via the website you have effectively have 6.5 billion possible users.
slugster
Since I don't need editing capabilities, maybe my best option is to export the document to HTML and display it as is. Unfortunately it creates other problems for me, since the text is analyzed by a 3rd party product that relies on the words offsets in the document.
Jacob
@slugster - I'm not so sure it's the case - the users don't have access to WORD or Office - they just have access to what's in a .doc file... And what is a "server"? You can access word remotely on any machine via COM - are all machines "servers"? Could you mention the license paragraph you're refering to here?
RnR
A: 

If you are running IE only you can do it with VBA/ vbscript. Its probably easier to convert the word document to html and then you can use javascript / css and be cross browser compatible.

u07ch