If you are using EDraw Office Component, you can set the Read-Only property for the opened MS Word and MS Excel.
You needn’t do the office automation by yourself. Only call the “ProtectDocument” method in the component.
[id(55), helpstring(“Protects the opened file from modification for Word and Excel. Read Only.”)]
boolean ProtectDocument([in, optional] VARIANT Password);
boolean ProtectDocument([in, optional] VARIANT Password);
The method will provent anybody to edit the document again. Include to copy or paste the content. It’s very helpful in the online document management system.
2 Responses to “Make embedded Word, Excel document read-only, without using Automation”
Leave a Reply
You must be logged in to post a comment.
October 1st, 2007 at 8:42 am
I have used this method on a word document but when I use it I cannot use the Page Down button on my keyboard to navigate past the 1st page. Is there a workaround for this?
October 1st, 2007 at 9:47 am
Could you tell us your develop language? VB, HTML or C#? You can get a first test at OADemo.exe in the install directory. Or visit http://www.ocxt.com/oademo_javascript.php to view whether the same error occurs.