Hi,
I need to protect certain areas in my document, the restriction feature works very well, but it is done manually.
I need to do this programmatically in the backend of my application and return the sfdt with protected areas, I tried to do it but I wasn't successful
An alternative from the SyncFusion team which is to put the protected areas inside a bookmark and in the document's change event it doesn't allow removing if the mouse cursor is inside a bookmark, this solution works but if I insist by clicking and typing an exception is generated in editor and after that you can edit the content inside the bookmark.
Is there any solution to this issue?
Hi Kurthis, in the documentation it just shows how to protect the entire document, what I need is to specify parts of the document that I want to protect.
Like the image below, but I want to do this programmatically:
Thanks for the response
Suriya, but doing this from the front end would not meet our requirements.
Is there any change to consider this feature in future releases?
This is important for us to be able to do this from the backend.
|
WordDocument document = new WordDocument(@"input.docx"); //Sets the protection with password and it allows only to modify the form fields type document.Protect(ProtectionType.AllowOnlyFormFields, "password"); //Saves and closes the Word document instance document.Save("Sample.docx", FormatType.Docx); document.Close(); |