Results 1 to 2 of 2
  1. #1
    5 Star Lounger Ruff_Hi's Avatar
    Join Date
    Feb 2001
    Location
    New York, New York, USA
    Posts
    768
    Thanks
    0
    Thanked 0 Times in 0 Posts

    List of Mis-spelt Words (Word XP)

    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>post 285,569</post:> 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)?
    (Location Australia, then UK, but now USA. Heart, outlook, attitude, etc always Australian)
    Quote: "All Happiness is the release of internal pressure"

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: List of Mis-spelt Words (Word XP)

    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.

    <code>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</code>
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •