Word.Tips.Net WordTips (Menu Interface)

Pulling Out Spelling Errors

Word includes a power spellchecker that allows you to determine which words in a document need your attention. Sometimes, it might be helpful to have all the misspelled words in one place, rather than throughout the document. If you have this need, the following VBA macro will gather all the misspelled words from one document and place them in a new document.

Sub GetSpellingErrors()
    Dim DocThis As Document
    Dim iErrorCnt As Integer
    Dim J As Integer

    Set DocThis = ActiveDocument

    iErrorCnt = DocThis.SpellingErrors.Count
    For J = 1 To iErrorCnt
        Selection.TypeText Text:=DocThis.SpellingErrors(J)
    Next J
End Sub

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (1465) applies to Microsoft Word 97, 2000, 2002, and 2003.

Related Tips:

Do More in Less Time! Are you ready to harness the full power of Word 2013 to create professional documents? In this comprehensive guide you'll learn the skills and techniques for efficiently building the documents you need for your professional and your personal life. Check out Word 2013 In Depth today!


Leave your own comment:

  Notify me about new comments ONLY FOR THIS TIP
Notify me about new comments ANYWHERE ON THIS SITE
Hide my email address
*What is 5+3 (To prevent automated submissions and spam.)
           Commenting Terms

Comments for this tip:

David Prout    07 Jan 2016, 12:57
I am trying my hand at proofreading and came across your GetSpellingErrors macro listed below which I am finding very helpful.

Sub GetSpellingErrors()
    Dim DocThis As Document
    Dim iErrorCnt As Integer
    Dim J As Integer

    Set DocThis = ActiveDocument

    iErrorCnt = DocThis.SpellingErrors.Count
    For J = 1 To iErrorCnt
        Selection.TypeText Text:=DocThis.SpellingErrors(J)
    Next J
End Sub

I can think of a few things that could help me but I am hopeless with Word Vba. I think some of my suggestions are possibly easy and wonder if anyone can help please

It would help me if each error could be sequentially numbered. I find sometimes word underlines a word that is not a spelling error but the word may be used several hundred times in the document. This is making it difficult to find the example that is highlighted. Numbering would help locate the problem

If the count problem is difficult would it be possible to add the page number where the error occurs. This would be very useful

I am wondering if the opening of two word documents at the same time would be partly responsible for the length of time that the macro takes to run. 15-20 minutes is about the average and I am suspicious that these take up a lot of memory. Could the output be sent to a specified unopened text file to minimise the time being taken to process the macro

Harpreet    30 Jul 2015, 07:55
Many Thanks for this code..It is very useful for my typing practice in word...
Janine manville    27 May 2015, 16:53
Is it possible to do this for the context spelling errors, ie correct spelling wrong context?
JD Chinga    09 Feb 2015, 08:42
Very useful tip, many thanks.
David Prout    11 Dec 2014, 10:41
I have just found the GetSpellingErrors macro, it generally works very well. For some reason it seems to be picking some words incorrectly. e.g. in a 385 page document I was analyzing it picked out the word "on". To find that error I had to use the "Find" to go through but of course it picks up every occurrence including Son,won, gone etc. This would take forever to find as there are many "Finds" on every page. I used several dodges and eventually found the error but it still took time.
Three questions.
1. Would it be possible to print the page location with the text.
2. Would it be possible to improve the highlight so it would easily be seen. e.g. color the background or change Font color of the word
3. The example I gave above was a grammar error, Would it be possible to search only spelling problems not grammar

Our Company

Sharon Parq Associates, Inc.

About Tips.Net

Contact Us


Advertise with Us

Our Privacy Policy

Our Sites


Beauty and Style




DriveTips (Google Drive)

ExcelTips (Excel 97–2003)

ExcelTips (Excel 2007–2016)



Home Improvement

Money and Finances


Pests and Bugs

Pets and Animals

WindowsTips (Microsoft Windows)

WordTips (Word 97–2003)

WordTips (Word 2007–2016)

Our Products

Helpful E-books

Newsletter Archives


Excel Products

Word Products

Our Authors

Author Index

Write for Tips.Net

Copyright © 2017 Sharon Parq Associates, Inc.