Learn how to unprotect Word DOCX/DOC documents in Python: https://blog.aspose.com/2021/11/16/unprotect-word-documents-in-python/
Last active
November 16, 2021 16:24
-
-
Save aspose-com-gists/a4151d5021f76c18f513634e2c90d480 to your computer and use it in GitHub Desktop.
Unprotect Word Documents using Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import aspose.words as aw | |
# load password protected Word document | |
doc = aw.Document("document-password-protected.docx", aw.loading.LoadOptions("password")) | |
# remove restrictions | |
doc.unprotect() | |
# save updated document | |
doc.save("document-unprotected.docx") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import aspose.words as aw | |
# load password protected Word document | |
doc = aw.Document("document-password-protected.docx", aw.loading.LoadOptions("password")) | |
# save document | |
doc.save("document-unprotected.docx") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment