ACTIVE ERROR WINDOWS

How to fix
Word Runtime Error 91
on windows

Word Runtime Error 91 occurs when an object variable is not set, preventing macros or document actions from executing properly. This error typically arises from issues within Word's VBA environment.

Word Runtime Error 91: How to Fix It
Quick Summary
Error severity
Medium
Est. time
30 minutes
Method
broken object reference in VBA
Offer Fortect PC Suite
Start fix →
Ad · we may earn a commission
0 Comments
01

Is this your error?

Match two or more signs — you are likely dealing with Word Runtime Error 91.

Word stops responding
Error message about object variable not being set
Document fails to open or execute macros
02

What causes Word Runtime Error 91?

  • Broken object reference in VBA
  • Corrupted Normal template
  • Faulty add-in or macro
03

Fix in 5 steps

1
Start Word in Safe Mode and Disable Problem Add-ins

Press Win + R, type winword /safe, and press Enter. Check if the error persists after disabling add-ins.

2
Check the Normal Template for Corruption

Rename Normal.dotm to Normal.old to create a fresh template and see if the error resolves.

3
Remove or Repair the Macro That Raises the Error

Open the document, access the Visual Basic Editor, and disable or fix the problematic macro.

4
Open the File Without Its Embedded Automation

Create a backup, open a copy of the document, and save it under a new name to remove unstable states.

5
Repair Microsoft Office from Apps and Features

Use the Apps and Features settings to repair the Office installation if the error continues.

Offer Fortect PC Suite

Repairs Windows system files, removes malware, and restores a clean OS state — without reinstalling.

Ad · we may earn a commission
Get Fortect PC Suite ↗

Word stops with Runtime Error 91: Object variable or With block variable not set, and the document or macro action cannot continue.

That failure usually points to a broken object reference inside Word’s VBA environment, not a broad Windows crash. The error appears when a macro, form, add-in, or document-level event tries to use an object that has not been set, has already been released, or no longer matches the code that calls it. In Word, that can stop a document from opening cleanly, break editing automation, or interrupt a task that depends on a custom command. The same message can appear during launch, while opening a file, or when a specific action triggers VBA code.

Runtime Error 91 is a classic object-reference fault in VBA. Word uses VBA to drive macros, document events, and add-ins that extend the editor beyond normal typing and formatting. When code expects a document, range, selection, control, or other object and the reference is empty or invalid, Word cannot continue that routine. The result is the familiar message about an object variable or With block variable not being set, which is why the error often looks random until the exact trigger is isolated.

The error can surface after a template change, after an add-in update, or after a document with embedded automation is opened. It can also appear when Word loads startup extensions that hook into the editor before the main window is ready. In that situation, the failure is not the document text itself but the code path behind it, and the interruption feels broader than it is because Word blocks the action that depended on the missing object.

Users often see the issue most clearly in Word files that carry macros, custom ribbon actions, mail-merge automation, or legacy document logic. A plain document may open normally, while one file or one command fails immediately. That split is important because Runtime Error 91 usually affects a specific code path rather than the whole application, so a fix has to identify whether the trigger lives in the document, an add-in, or the Word installation state that supports VBA.

The same message can be misleading because it is a programming error at heart, but the visible symptom is a Word problem. If the macro code points to a missing object, the editor reports the fault instead of explaining the broken reference. If an add-in injects the failing code, the error appears as though Word itself is damaged. That is why the first practical move is to separate Word’s built-in behavior from the extensions and automation loaded into it.

Several conditions can produce the same fault. A damaged Normal template can pass bad macro behavior into every new session, a corrupted add-in can call Word objects before they exist, and a document with stale VBA references can fail when it opens or runs an event. Each of those causes produces the same visible result because the VBA engine reaches a line of code that expects a valid object and receives nothing usable in return.

Another common cause is a reference mismatch inside a macro project. VBA code may rely on libraries, forms, or objects that were available when the macro was written but are not available now. When that happens, Word loads the code, but the routine breaks the moment it tries to touch the missing component. The failure is technical rather than cosmetic, which is why no amount of simple document reformatting will remove it if the code path stays intact.

Add-ins are also a frequent source of the fault because they run automatically and can interact with Word before the user opens a document. A faulty add-in can leave an object uninitialized, especially if it expects a window, selection, or file handle that is not ready yet. Once that happens, Word throws Runtime Error 91 during startup or at the first action that depends on the add-in’s code.

Document-level VBA can trigger the same message if a file contains event code tied to opening, saving, printing, or selection changes. Those routines are meant to run inside a very specific state, and if the state is wrong, the object reference breaks. A document can look ordinary while still carrying hidden automation that produces the error as soon as Word tries to process it.

The Word automation layer matters because it connects the user interface to the document object model. That model is what VBA uses to reach paragraphs, ranges, windows, and controls. When the model is stable, macros can manipulate the document reliably. When the object chain is broken, the editor cannot satisfy the code’s request, so the operation stops with Error 91 instead of completing the task.

This is why the right response is to narrow the fault before touching wider system repair tools. Word is not the same thing as Windows, and a broken object reference inside VBA often clears when the bad macro, add-in, or template is isolated. If those checks do not solve it, then repairing the Office installation becomes the next logical layer because Word also depends on its program files, shared components, and registration state to load automation cleanly. Here are 6 solutions to fix Word Runtime Error 91.

Word Runtime Error 91 appears when a macro, add-in, or document event fails to set a required object.

Start Word in Safe Mode and Disable Problem Add-ins

This method isolates Word’s loading path so you can see whether the runtime error is tied to an extension that runs at startup.

  1. Press Win + R to open the Run box.
  2. Type winword /safe and press Enter.
  3. Open Word and check whether the Runtime Error 91 message appears.
  4. Go to File and select Options.
  5. Open Add-ins and review the active add-ins.
  6. At the bottom, choose COM Add-ins and click Go.
  7. Clear the check box for each add-in, then click OK.
  8. Restart Word normally and test the same action again.
Safe Mode helps show whether the error comes from an add-in loaded with Word.

Check the Normal Template for Corruption

Word stores shared startup behavior in the Normal template, and a damaged copy can keep broken automation alive in every new session.

  1. Close Word completely.
  2. Press Win + R, type %appdata%MicrosoftTemplates, and press Enter.
  3. Find Normal.dotm.
  4. Rename it to Normal.old.
  5. Open Word again to let it create a fresh Normal template.
  6. Retry the action that produced Runtime Error 91.
  7. If needed, copy only trusted customizations back later.
Replacing Normal.dotm removes template-level corruption that can trigger VBA errors.

Remove or Repair the Macro That Raises the Error

If the failure happens inside one document or one command, the broken code path is usually inside the macro project itself.

  1. Open the affected document in Word.
  2. Press Alt + F11 to open the Visual Basic Editor.
  3. Look for the macro, event procedure, or form tied to the action.
  4. Check any object assignments that run before the error appears.
  5. Temporarily disable the macro by removing its trigger or event call.
  6. Save the document as a clean copy.
  7. Open the clean copy and test the same workflow again.
Directly isolating the macro helps when the object reference failure lives in document code.

Open the File Without Its Embedded Automation

A document can carry its own event code or linked behavior, so testing a plain copy separates the file problem from the application problem.

  1. Make a backup copy of the affected file.
  2. Open the copy in Word.
  3. Use File and select Info to inspect document details.
  4. Save the file under a new name to strip out unstable state.
  5. If the document contains macros, save it as a macro-free format only when appropriate.
  6. Close Word and reopen the new copy.
  7. Test whether the same runtime error still appears.
A clean copy helps determine whether the document itself is carrying the bad object reference.

Repair Microsoft Office from Apps and Features

When Word’s program files or shared components are damaged, built-in repair can restore the code Word uses to load VBA and add-ins.

  1. Close all Office apps.
  2. Open Settings and go to Apps.
  3. Select Installed apps or Apps & features.
  4. Find Microsoft 365 or Microsoft Office.
  5. Click Modify or Change.
  6. Select Quick Repair and start the repair.
  7. If the problem remains, run Online Repair.
  8. Restart Word and repeat the failing action.
Office repair restores Word components that can affect VBA object handling.

Reset Word Registration and Recreate Its User State

If Word still throws Error 91 after repair, resetting its registration and user-specific state can clear the launch path that keeps loading the fault.

  1. Close Word and any Office process in Task Manager.
  2. Press Win + R, type winword /r, and press Enter.
  3. Wait for Word to re-register its file associations.
  4. Open Word and test the same document or macro.
  5. If the error continues, remove recently added customizations from the user profile.
  6. Start Word again with a clean session and check the result.
Re-registering Word can clear stale launch behavior that keeps object references from initializing properly.

Sources: easeus.com, youtube.com, Microsoft Learn, Stack Overflow, Microsoft Learn, reddit.com, reddit.com, reddit.com, reddit.com, reddit.com

Bottom line

To resolve Runtime Error 91, users should isolate the problematic macro, add-in, or template. If the issue persists, repairing the Office installation may be necessary.

Frequently asked questions

It indicates that an object variable or With block variable is not set in Word's VBA environment.

Ensure that all macros and add-ins are properly coded and updated, and regularly check the Normal template for corruption.

Did this fix work for you?
Lucia Danes

Written & verified by

Tech Support Specialist
Driver troubleshooting Hardware conflicts Device Manager errors USB and peripheral issues Audio and video problems

Lucia Danes is a tech support specialist focused on driver conflicts, hardware recognition failures, and device-level troubleshooting on Windows. Her guides walk users through the full diagnostic process — from reading Device Manager error codes and identifying problematic drivers to performing clean driver installations and resolving hardware compatibility issues. Lucia covers a wide range of devices including printers, audio hardware, graphics cards, USB peripherals, and external storage. Her writing is valued for its step-by-step precision and the real-world testing behind every recommended fix.

0 Comments

Be the first to comment

Still worried? Run a free check.

Paste any URL or domain — we'll scan it against 4.2M known threats in 10 seconds.

View full scanner → Add to your website →