Is it possible to lock a document?


#1

this totally goes against what you want a doc for but is it possible to lock a Aspose.Word doc so that the user cannot edit any of the data on the doc??

basically we want to prevent low level users being able to edit the doc. but high level users can edit the doc once its produced

i realise the Protect Method is there but is there not a full protection, as in no edit whatsoever

Cheers,
Craig


#2

We can only do what MS Word can do in this respect. Use ProtectionType.AllowFormFields, this is close enough to full protection.


#3

nice one. cheers


#4

Is there any way to lock certain block of text in the document using aspose.


#5

Hi,

As Roman has mentioned, Aspose.Word capabilities do not exceed MS Word ones. So you can lock the whole document, not a certain block of text.


#6

I think you can lock per section.

Try setting Document.ProtectionType = ProtectionType.AllowOnlyFormFields
and then setting each section Section.ProtectedForForms = true.

see this for more info http://www.aspose.com/Products/Aspose.Word/Api/Aspose.Word.Section.ProtectedForForms.html