Batch Show Spelling and Grammar Errors in Microsoft Word Documents
Question details
Show spelling and grammar errors in multiple Word documents without changing each document individually.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Several documents have spelling or grammar error display disabled, and the user wants to update them in a batch.
- Observed behavior
- Spelling or grammar errors are hidden in the affected documents.
Place the documents to process in one folder and close any that are already open in Word. Make sure you can edit and save the files, and use macros only from sources you trust.
Run a Word VBA macro on all documents in a folder
Use this macro to enable spelling and grammar error display in supported Word documents in one folder.
The macro opens, updates, saves, and closes each .doc, .docx, or .docm file in the selected folder. It does not process subfolders.
The macro also enables Word's application-wide as-you-type spelling and grammar checks. It temporarily disables macros in the documents it opens and restores the previous security setting when it finishes.
In Word, open the Visual Basic editor, for example through Developer > Visual Basic. Insert a standard module in Normal or another trusted global template.
Paste this code into the module: Sub ShowErrorsInFolder() Dim picker As FileDialog Dim folderPath As String, fileName As String, ext As String Dim doc As Document Dim oldSecurity As MsoAutomationSecurity Dim errMessage As String Set picker = Application.FileDialog(msoFileDialogFolderPicker) If picker.Show <> -1 Then Exit Sub folderPath = picker.SelectedItems(1) & Application.PathSeparator oldSecurity = Application.AutomationSecurity On Error GoTo Failed Application.AutomationSecurity = msoAutomationSecurityForceDisable Options.CheckSpellingAsYouType = True Options.CheckGrammarAsYouType = True fileName = Dir(folderPath & "*.doc*") Do While fileName <> "" ext = LCase$(Mid$(fileName, InStrRev(fileName, ".") + 1)) If Left$(fileName, 2) <> "~$" And (ext = "doc" Or ext = "docx" Or ext = "docm") Then Set doc = Documents.Open(FileName:=folderPath & fileName, AddToRecentFiles:=False) If Not doc.ReadOnly Then doc.ShowSpellingErrors = True doc.ShowGrammaticalErrors = True doc.Save End If doc.Close SaveChanges:=wdDoNotSaveChanges Set doc = Nothing End If fileName = Dir() Loop GoTo CleanUp Failed: errMessage = Err.Description If Not doc Is Nothing Then doc.Close SaveChanges:=wdDoNotSaveChanges CleanUp: Application.AutomationSecurity = oldSecurity If errMessage <> "" Then MsgBox "Processing stopped: " & errMessage Else MsgBox "Processing finished. Read-only files were skipped." End If End Sub
In Word, open Developer > Macros, select ShowErrorsInFolder, and choose Run. Select the folder containing the documents when prompted.
Open a processed document and check whether misspelled words and grammar issues are marked. Review any read-only files separately; if processing stops with an error, resolve it and run the macro again.

Use an existing Word batch-processing add-in
If you already have a trusted folder-processing add-in, use it to run a short macro on each document.
Edit and proofread Word documents with WPS Writer
WPS Office is a free, lightweight alternative with a familiar interface for opening and editing Word documents. Its Word format compatibility helps you move existing files into WPS Writer, although it does not change Microsoft Word's document settings in a batch.

Frequently Asked Questions
Why are errors still not marked after I run the macro?
Check Word's as-you-type proofing options and the text's proofing language. Select the affected text and review its language settings to make sure Do not check spelling or grammar is not enabled.
Does the folder macro process documents in subfolders?
No. Select each folder separately when running ShowErrorsInFolder, or modify the macro to traverse subfolders.
What happens to read-only documents?
The folder macro skips saving read-only documents. Remove the read-only restriction or obtain edit permission, then run the macro on those files again.
Can I use the short CheckSpelling macro with a batch add-in?
Yes, if the add-in can run a Word macro on each file. Select CheckSpelling in the add-in and make sure the add-in saves each document after running it.




