A simple utility to remove edit protection from Microsoft Word documents (.docx).
- Removes document edit protection by modifying the
settings.xmlfile inside the Word document - Disables tracking revisions to prevent Word from tracking edits (Removes manual accepts)
- Creates backups of original files before modification
- Works with .docx files (modern Word format)
- Does NOT remove password encryption - if entire file is encrypted with a password, you still need the password to open it
- Does NOT change document content - all text, formatting, and other content remains intact
The tool:
- Creates a temporary directory
- Extracts the .docx file (which is a ZIP archive)
- Locates and modifies the settings.xml file to disable document protection and track changes
- Carefully repackages the document to preserve Word format compatibility
- Preserves a backup of the original file with .bak extension
python wfeb.py document.docxOr if installed as a package:
wfeb document.docxgit clone https://github.com/KRWCLASSIC/wfeb.git
cd wfeb
pip install -e .Might be broken, I had too much issues with it, sorry.
When a Word document is protected for editing, it has specific settings in the settings.xml file:
- The
documentProtectionelement withenforcement="1"indicates protection is enabled - The script changes this to
enforcement="0"andedit="edit"to disable protection - The script also removes the
trackRevisionselement to prevent Word from telling user to manually accept changes
- Python 3.6 or higher