VBA & Macro Problems

Fix the Object Variable Not Set Error in Microsoft Word

Phi Hung VoPhi Hung Vo Nov 22, 2026 868 views

Question details

The user needs to resolve an object variable or With block variable not set error in Word.

Fix the Object Variable Not Set Error in Microsoft Word
Product
Microsoft Word
Device & OS
not provided
Scenario
A Word document, the Normal template, or a global add-in may contain VBA code that triggers the error.
Observed behavior
Word displays an object variable or With block variable not set error.
Before you start

Note whether the error appears when Word starts, when a particular document opens, or when a macro runs. The Safe Mode and keyboard instructions below apply to Word on Windows.

Solution 1Recommended

Test Word in Safe Mode and reset the Normal template

Use Safe Mode to narrow down the cause, then reset Normal.dotm if the template is suspected.

1
Start Word in Safe Mode

Close Word, press Windows+R, enter winword /safe, and select OK. Repeat the action that caused the error.

2
Locate Normal.dotm

Close Word again. Press Windows+R, enter %appdata%\Microsoft\Templates, and select OK to open the templates folder.

3
Rename the template

In File Explorer, rename Normal.dotm to OldNormal.dotm. If that name already exists, choose another unused name.

4
Restart and test

Open Word normally and repeat the action. Word should create a fresh Normal.dotm template.

Test Word in Safe Mode and reset the Normal template
What the test means: If the error disappears in Safe Mode, a template or add-in may be involved; Safe Mode alone does not prove that Normal.dotm is the cause. Renaming the template also temporarily removes its custom macros, styles, and other customizations from the new template.
Free Microsoft Office alternative

Edit Word documents with WPS Writer

WPS Office is a free, lightweight alternative for everyday document editing. Its familiar interface and Microsoft Word format compatibility make it easier to move existing documents into a new workflow. It does not repair Microsoft Word's VBA error.

Open and edit Microsoft Word DOC and DOCX filesWork with documents in a familiar word-processing interfaceUse a free, lightweight alternative for everyday editingMove existing Word documents into a WPS workflow
microsoft office alternative - wps office

Frequently Asked Questions

What does the object variable not set error mean?

VBA error 91 usually means code is trying to use an object that has not been assigned or is Nothing. If the error dialog offers Debug, select it to inspect the highlighted code in the Visual Basic Editor.

Does Safe Mode tell me that Normal.dotm is broken?

No. On Windows, run winword /safe from the Run dialog to test Word without certain startup components. If the error disappears, investigate templates and add-ins separately.

Will resetting Normal.dotm delete my customizations?

Renaming Normal.dotm keeps the old file, but Word's new template will not automatically include its custom macros, styles, and other customizations. Keep the renamed file if you need to recover them.

How do I check whether an add-in is causing the error?

Open File > Options > Add-ins in Word, choose an add-in type from the Manage list, and select Go. Temporarily disable applicable add-ins, restart Word, and test whether the error returns.