Password Recovery

How to Remove a VBA Password in Word

Leena Taylor Paul By Updated August 28, 2026 8 min read
Quick Answer

A Word VBA project password hides your macro code behind a flag, not encryption, so it comes off a file you own though the word itself is long lost. The real question is whether the lock sits on the code or on the document. The Univik VBA Password Remover for Word clears the code lock in one step.

Word macros hide in two places, documents and templates, and both can carry a password on the code. Open the editor to tweak a mail merge routine and Word asks for a word nobody kept. The good news is that this particular lock was never strong.

Where Word Keeps Its Locked Macros

Word stores macros in macro enabled files, and the extension tells you which kind you have. A .docm is a single document that carries code. A .dotm is a template that hands its code to every document built on it, which is how one locked template can gate a whole team's automation. The everyday example is Normal.dotm, the global template Word loads at startup, where personal macros live. Whatever the extension, the macro project inside is what holds the password.

.docm document
One file with its own macros. The lock affects only that document and the people who open it.
.dotm template
A blueprint that shares code with every document made from it. One locked template blocks many documents.

The Fast Way to Unlock Word Macros

A remover reads the document, lifts the project lock and saves the file with the macros untouched. It saves you the hand editing that breaks so many files, and it treats a template the same as a document.

  1. Duplicate the document firstKeep the original aside and run the tool on the copy.
  2. Load the .docm or .dotmPoint the Word VBA remover at the file.
  3. Lift the project lockThe tool clears the code password and writes the file back.
  4. Reopen in WordPress Alt and F11 and your modules are there to edit.
Open a locked Word document or template in one step

The Univik VBA Password Remover lifts the code lock on your .docm and .dotm files and keeps the text, styles and every macro as written, so you can edit the project again in minutes.

Free Download See All Features

Why the Word VBA Lock Lifts

The password on a Word macro project does not encrypt anything. It stores a hash and makes the editor ask for that word before the code opens, while the macros themselves sit in plain form inside the file. Clear that flag and the code appears, with nothing to undo because nothing was ever scrambled. The full account of how this gate works, and why it was never meant to keep an owner out, lives in the reference on how the lock is built. Word behaves the same way, since both share one VBA engine, as do PowerPoint, Access, Outlook and Project.

With Word the confusion is almost always the template. A team locks the macros in one shared template, the author moves on, and suddenly a hundred documents inherit code nobody can edit. Point the fix at the template, not each document, and the whole set opens up at once.

NR
Nick Rogers
Founder, Univik
Building Windows tools since 2013

Unlocking a .docm by Hand

Because a .docm is a zip archive, the free route mirrors the one for spreadsheets. You change the extension to .zip, open it, and the macro project sits at word/vbaProject.bin, while Excel uses the xl folder. Editing that binary to invalidate the lock, then repacking as a .docm, drops the wall on the next open. It is the same trick with a different folder name, and the same catch. It corrupts the project about as readily as it clears it, and a damaged template takes the whole team's automation with it. The step by step hex detail and the exact points where it fails are explained in the hex editor reference, so there is no need to repeat them here.

Templates Make Word Different

Spreadsheets rarely share code, but Word runs on templates, and that changes the stakes. Normal.dotm loads with every session, so a lock there follows you into every new document. Global templates in the Word STARTUP folder attach their macros to the application itself. A workgroup template on a shared drive can push locked code to a whole office. When you go looking for the file to unlock, look past the document in front of you. The template behind it is what holds the lock, and clearing that one file frees every document that leans on it.

Document Lock or Code Lock

Word has several protections that all get called the password, and only one of them is the VBA project lock. Sorting them out saves you chasing the wrong fix.

VBA project passwordKeeps the macro code out of view in the editor. The soft lock this page clears.
Document open passwordEncrypts the whole file. Without the word the document will not open, and no macro tool changes that.
Restrict EditingBlocks changes to the text or formatting. A separate weak lock, not the code lock.
Read only recommendedA prompt, not a barrier. It suggests you leave the file alone and nothing more.

If the document opened without a prompt but the editor asks for a word, you are on the VBA project password. If the file will not open at all, that is the encrypted open password and a different problem entirely.

What Survives When the Password Goes

Lifting the code lock is a narrow change. Your standard modules, userforms and the ThisDocument module all stay exactly as written. Mail merge routines, AutoOpen and AutoExec macros, custom ribbon commands, every reference to an outside library, all of it opens intact. The text, styles and layout of the document never enter the picture, because the project lock sits on the code alone. What you get back is the source you wrote, ready to read and edit, with no rewrite waiting on the other side.

Everyday Reasons to Unlock Word Macros

This lands on real desks more than it sounds. The consultant who built your firm's document assembly macros wrapped them in a password and left. A letterhead template runs the whole company's correspondence and needs a branding update the author never handed over. Legal wants the merge logic in a contract template reviewed before a filing. An old .doc from a merged business still runs but cannot be opened for edits. In each case you hold the document and the right to maintain it, which is where a remover fits. Keep it to files you are entitled to work on, and leave anyone else's documents alone.

Word VBA Password Questions

Yes, when it is the VBA project password on a file you own. That lock only hides the macro code and lifts with no need for the forgotten word. A document open password is separate and encrypts the whole file.

A .docm is a zip archive, and the macro project lives in a file named vbaProject.bin inside the word folder. The lock is a flag on that project, which is why clearing it never touches your text or layout.

No. The text, styles and every macro stay as written. Only the gate that hid the code from the editor is lifted, so mail merge routines and AutoExec macros run the way they always did.

No. A document open password encrypts the file and needs the word to open at all. A VBA project password guards the code alone and comes off without it. Restrict Editing and read only are two more separate locks again.

Yes. Normal.dotm and any global template hold their macros the same way a document does, so the same project lock applies and the same removal clears it. Word keeps most of its macros in templates.

Not reliably. It leans on the older OOXML layout and can corrupt the project on newer or 64 bit builds. Work on a copy if you try it, and read the mechanism guide for where it breaks.
Leena Taylor Paul

Written and maintained by Leena Taylor Paul and the Univik team, developers of Windows data conversion and recovery software since 2013. The Word cases we see almost always come from a shared template, so this guide points readers at the template first and saves them unlocking documents one by one. Last verified August 2026. Stuck on a locked template your team relies on? Contact our support team.