How to Protect Word Documents to add Read-Only Permissions as well as Password

Greetings!

  1. What do we want to do?

We want to protect some documents, including but not limited to word, excel, mail, pdf, etc.
For example, adding read-only permission to word and the password to open the file, these actions can be done manually by mouse operation, but we need to use the program to achieve automation

  1. Regarding ASPOSE, what functions do we care about?
    a. What types of files can be protected, such as office documents and other document types
    b. We can implement protection types. Different types of document protection may be different. For example, word copy supports setting open passwords and setting read-only; mail (mail everywhere.msg documents) settings do not allow forwarding

Looking forward to hearing from you.


This Topic is created by asad.ali using Email to Topic tool.

@51component,
Please use the Document.Protect method to protect a document from changes (for example, to make it read-only). This method accepts a ProtectionType parameter and optionally a password by passing one as the second parameter.
For more information, please check the following article:

To encrypt a document, use the Password property to provide a password that functions as an encryption key. This will modify the content of your document and make it unreadable. The encrypted document will require to have this password entered before it can be opened.
For more information, please check the following article: