How to amke word doc as readonly

Posted by Shoyebaziz123 under ASP.NET on 10/15/2012 | Points: 10 | Views : 1420 | Status : [Member] | Replies : 1
Hi All,

How can i make my downloaded word file as read only , i have written the code for converting my page ( .aspx) to word , but the downloaded word doc is editable , how can i make it read only ?


Posted by: Megan00 on: 10/16/2012 [Member] Starter | Points: 25

You can protect this word file from editing and modifying by any of below code:
document.Protect(ProtectionType.AllowOnlyComments, "*******");

document.Protect(ProtectionType.AllowOnlyFormFields, "*******");

document.Protect(ProtectionType.AllowOnlyRevision, "*******");

details in:

Never give up! Smile to the world!

Shoyebaziz123, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response