We help IT Professionals succeed at work.

Extract misspelled words in Microsoft Word or Excel

Medium Priority
827 Views
Last Modified: 2008-11-29
In long lists of words, one to a line, I need to extract those that are misspelled or, alternatively, extract those that are spelled correctly and leave the ones misspelled.  The bottom line is that I need to be able to separate misspelled from correctly spelled words but do not want to add the misspelled words to the custom dictionary.  Is there way to do identify these words and do this?  I do not mind doing this in either Word or Excel.  Thank you.
Comment
Watch Question

Retired
CERTIFIED EXPERT
Top Expert 2012
Commented:
This is a Word macro.
It will list the misspelings, one per line,  in a new document .
Sub ExtractMisspellings()
    Dim wd As Range
    Dim docA As Document
    Dim docB As Document
    Dim spelSuggs As SpellingSuggestions
    
    Set docA = ActiveDocument
    Set docB = Documents.Add
    For Each wd In docA.Words
        Set spelSuggs = wd.GetSpellingSuggestions
        If spelSuggs.Count > 0 Then
            docB.Bookmarks("\EndOfDoc").Range.Text = wd.Text & vbCr
        End If
    Next wd
End Sub

Open in new window

Explore More ContentExplore courses, solutions, and other research materials related to this topic.