• List of Mis-spelt Words (Word XP)

    Author
    Topic
    #438232

    Hi All,

    I’m looking for a way of getting a list of all the mis-spelt words in a document. I found this post 285,569 that will give me a list of words. Is there a test of some sort that will tell the VBA if the word is mis-spelt (ie, not in the dictionary)?

    Viewing 0 reply threads
    Author
    Replies
    • #1044308

      If “real time” spell checking is turned on (typically indicated by wavy red underlines) you can interrogate the SpellingErrors collection. The following only checks the body, but you can separately check the headers and footers in all the sections, as well as other StoryRanges such as footnotes.

      Sub MisspelledList()
      Dim strTemp As String, rngTemp As Word.Range
      For Each rngTemp In ActiveDocument.Content.SpellingErrors
      strTemp = strTemp & vbCrLf & rngTemp.Text & vbTab & "[at " & rngTemp.Start & "]"
      Next
      If Not (rngTemp Is Nothing) Then Set rngTemp = Nothing
      MsgBox "Spelling Errors Found:" & strTemp, vbOKOnly + vbInformation
      End Sub

    Viewing 0 reply threads
    Reply To: List of Mis-spelt Words (Word XP)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: