EvotecIT / PSWriteWord

PSWriteWord is powershell module to create Microsoft Word documents without Microsoft Word installed...
MIT License
231 stars 34 forks source link

Support password protection for document #37

Open leadlxx opened 4 years ago

leadlxx commented 4 years ago

For security reasons, can you support password protection for document? I found that the add-wordprotection function only protects document replication

PrzemyslawKlys commented 4 years ago
Add-WordProtection -WordDocument $WordDocument -EditRestrictions readOnly -Password '12345678'

image

That doesn't work? Keep in mind that Word protection isn't the most sophisticated one.

leadlxx commented 4 years ago

The scenario i want to implement is that set the document protection password, and you can only open the document by entering the protection password

PrzemyslawKlys commented 4 years ago

The DocX library doesn't seem to have that functionality as far as I see.

You can take a look here: https://s12316.pcdn.co/wp-content/documentation/xceed-document-libraries-for-net/webframe.html#Xceed.Words.NET~Xceed.Words.NET.Licenser~LicenseKey.html

Even the pay version doesn't seem to have encryption/decryption in place.

leadlxx commented 4 years ago

Hope this DocX library can realize this function in the future. and thank you for your help