logo
search
VBA & Macro Problems

How to Extract Words Marked by Spell Check into a Separate Document

Muhammad TalhaMuhammad Talha Oct 19, 2026 868 views

Question details

The user wants to compile all words flagged by the spell checker with red squiggly lines into a separate list or document.

Product
Microsoft Word
Device & OS
not provided
Scenario
Reviewing a document containing unrecognized terms, names, or foreign words and needing a consolidated list of these flagged words for review or dictionary addition.
Observed behavior
The word processor underlines unrecognized words in red but does not offer a built-in, one-click feature to export or collect these flagged words into a separate list.
Before you start

Ensure your document's proofing language is set correctly so that the spell checker accurately identifies unrecognized words. You will also need basic familiarity with the Developer tab to run a VBA macro.

Solution 1Recommended

Use a VBA Macro to List Spelling Errors

Since there is no native button to export spelling errors, a VBA macro can automatically scan the document, find all flagged words, and compile them into a new document.

This method involves using the Visual Basic for Applications (VBA) editor to run a specialized script. The macro will search through the active document's proofing errors and output each unique misspelled word into a fresh document for your review.

1
Enable the Developer Tab

Go to File > Options > Customize Ribbon. In the right pane, check the box next to 'Developer' and click OK.

2
Open the VBA Editor

Click the Developer tab on the ribbon and select 'Visual Basic', or press Alt + F11 on your keyboard.

3
Insert a New Module

In the VBA editor, click Insert > Module. Paste a spelling error extraction script (such as the 'List Spelling Errors' code provided by MVP Greg Maxey) into the blank window.

4
Run the Macro

Press F5 or click the Run button at the top of the editor. A new document will be generated automatically containing the list of flagged words.

Use a VBA Macro to List Spelling Errors
Review the Generated List: The generated list will likely include valid names, foreign-language terms, archaic spellings, and specialized jargon that are simply missing from the default dictionary. Review them carefully before taking further action.
Advanced Document Processing

Easily Run Macros and Manage Documents in WPS Writer

WPS Office provides robust support for VBA macros, allowing you to automate repetitive tasks like extracting flagged words just as you would in Microsoft Word. It is a lightweight, fully compatible alternative for all your document processing needs.

  1. 1. Open WPS Writer: Launch WPS Writer and open the document containing the flagged words.
  2. 2. Access the Developer Tools: Navigate to the Developer tab on the top ribbon.
  3. 3. Launch the VBA Editor: Click the 'Macros' or 'Visual Basic' button to open the scripting environment.
  4. 4. Execute Your Script: Paste your spelling extraction macro into a new module and click Run to instantly generate your list.
Seamlessly run VBA macros and scripts in WPS WriterFully compatible with Microsoft Word document formats (.doc, .docx)Lightweight installation and fast document loading timesFree built-in spell checker with customizable dictionary management
microsoft office alternative - wps office

Frequently Asked Questions

Why doesn't the word processor have a built-in button to export spelling errors?

Spell check tools are primarily designed for real-time, in-line correction rather than bulk data extraction. For advanced automation like exporting error lists, software relies on user-customizable VBA macros.

Can I add these extracted words to my custom dictionary in bulk?

Once you have reviewed the extracted list and verified which words are correct (such as specialized names or terminology), you can manually add them to your custom dictionary by going to File > Options > Proofing > Custom Dictionaries.

Will the macro extract grammatical errors as well as spelling errors?

No, a standard spelling error extraction macro only targets words flagged by the proofing tools as spelling mistakes (red underlines). Extracting grammatical errors (blue or green underlines) requires a different VBA object and script.