Monday, August 24, 2026

The spell check blind spot hiding in your Word documents

If you work with multilingual Word documents — and if you're reading a translation blog, you probably do — you've likely run into this: you select all the text, change the proofing language, run spell check, and everything looks clean. Then a client or colleague points out a misspelled word in a footnote. Or a text box. Or a header that somehow never got the memo.

This isn't a one-off glitch. It's a structural blind spot in how Word handles language, and it's common enough that I ended up writing a macro to fix it properly, once and for all.

Why this happens

In Word, language is a piece of direct formatting — the same category as bold or font size. When you press Ctrl+A and change the proofing language, you're only changing the language of whatever Ctrl+A actually selected. And Ctrl+A selects the main body text only.

It does not reach:

  • Headers and footers
  • Footnotes and endnotes
  • Comments
  • Text boxes and other floating shapes
  • The language baked into the document's styles themselves

Each of these is either a separate "story" in Word's internal model, or a separate object entirely, or a property of a style rather than of any visible text. Ctrl+A has no idea they exist.

The consequence: a document that looks "fully switched" to French, say, can still have an English footer that spell check quietly skips, or flags using the wrong dictionary. Worse, even if you painstakingly fix every visible instance by hand, a style's own internal language setting can still be wrong — meaning if someone later clears formatting on a paragraph, or types fresh text under that style, it silently reverts to the old language.

For anyone handling multilingual documentation, DTP files, or translated deliverables, this is exactly the kind of thing that slips past a visual review and turns up in a client's QA pass instead.

What the macro does

I built a Word VBA macro — EnhancedSpellchecker — that walks every part of a document that can independently carry a language, and forces it all to match one target language you pick. Then it runs Word's own spell checker, so you see the result immediately.


 

Concretely, it works in three passes:

Pass 1 — every story range, including linked chains such as different headers per section:

For Each storyRng In ActiveDocument.StoryRanges
    Do
        storyRng.LanguageID = TargetLanguage
        storyRng.NoProofing = False
        Set storyRng = storyRng.NextStoryRange
    Loop Until storyRng Is Nothing
Next storyRng

StoryRanges gives you one range per story type — body text, headers, footers, footnotes, endnotes, comments. Some of these are linked chains (for example, a document with different headers per section), so the inner Do...Loop walks NextStoryRange until the chain runs out, rather than assuming one range is the whole story.

Pass 2 — floating shapes with text, such as text boxes and callouts, which live outside any story range entirely:

For Each shp In ActiveDocument.Shapes
    If shp.TextFrame.HasText Then
        shp.TextFrame.TextRange.LanguageID = TargetLanguage
        shp.TextFrame.TextRange.NoProofing = False
    End If
Next shp

(One thing that surprised me while building this: Word's InlineShape object — pictures, embedded OLE objects, ActiveX controls — has no TextFrame property at all, and text boxes can never become inline shapes in Word's model. So every shape that can hold proofable text is already reachable here, in Shapes. No separate pass needed.)

Pass 3 — every style stored in the document, so the fix survives "Clear Formatting" and applies automatically to new text typed later:

For Each stl In ActiveDocument.Styles
    If stl.NameLocal <> "No Proofing" Then
        stl.LanguageID = TargetLanguage
        stl.NoProofing = False
    End If
Next stl

This is the pass most similar macros skip, and it's the one that matters most for long-term correctness. Direct formatting fixes what's on the page right now; the style-level fix addresses the root cause, so the document doesn't quietly drift back to the wrong language later. Note that it deliberately leaves any "No Proofing" style alone, since that style typically exists on purpose — to mark things like code samples that shouldn't be spell-checked at all.

What this solves in practice

Run the macro once, pick your target language from Word's standard language dialog, and it:

  • Applies that language consistently across the entire document — content and structure alike
  • Turns proofing back on everywhere it had been switched off
  • Leaves deliberately-excluded content (like a "No Proofing" style) untouched
  • Immediately runs spell check, so you can see and fix what's left

For anyone managing multilingual templates, recurring document types, or files that get re-used and edited over months or years, this closes a gap that's otherwise very easy to miss — and very visible when a client catches it instead of you.

Want the full macro?

The three snippets above show the core logic, but the complete macro includes proper error handling, state restoration (so it doesn't leave Word's language auto-detection permanently disabled), and full inline documentation explaining each decision — plus a companion guide covering installation, keyboard shortcuts, and known edge cases.

It's hosted on GitHub. Get in touch using the form on the right and I'll send you the link.

No comments:

Post a Comment

Thank you for your comment!

Unfortunately, comment spam has grown to the point that all comments need to be moderated. All legitimate comments will be published as soon as possible.