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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WebBrowser - Word Documents

Status
Not open for further replies.

Kenny62

Programmer
Mar 3, 2004
54
GB

I'm using the WebBrowser control to open Word, Excel files. I want the loaded documents to be in a "read only" mode. However, the WebBrowser allows edits, context menus, etc. I've tried SubClassing the control, but have determined that this is impossible thru normal methods. Any ideas.

Note: If i set the word document to readonly - users can still modify the view on screen - cut and paste etc. Also if the document has textboxes and the user clicks on thes items a floating toolbar is displayed - most annoying!

Thanks for any help in advance, Ken.
 
I think the user can still edit them but that will be a local version for them not the version on the server. So I don't really see a problem. If you want to make things readonly then I would use pdf wich was designed for this sort of things.

Christiaan Baes
Belgium

I just like this --> [Wiggle] [Wiggle]
 
Surely there must be a way to use word in a read only mode in a web browser control. (I have to make do with what i have installed - which is word 2002...I'm not keen on converting thousands of documents to pdf format!). Any other ideas. Thanks, Ken.
 
PDF conversions can be automated. To make the file being viewed as readonly it might take some work. If you are opening the file from a network share, you should be able to just set that file's attributes to read only (rightclick->properties->read only). If you are downloading the file locally or hosting the file on a web server, you will have to find the local copy of the file and make it read only. Which can be done (the read only part) but I have not idea how to track down one doc in the inet cache.
Even making the file read only will not prevent the user from modifying what they see, they just can't save it back to that file. To make it so that the user can not modify anything, converting to PDF is the best answer.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Yep, and one of these days I will actually answer one just not today,, sorry.

Christiaan Baes
Belgium

I just like this --> [Wiggle] [Wiggle]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top