Share via

spell check macro

Anonymous
2011-09-19T09:30:17+00:00

I need a macro that will spellcheck the whole doc without me having to push any buttons, that is, the computer will just replace misspelled words with its best guess. I need to separate words that have a superscript from their superscript because word counts those as errors, and i need it to skip words that begin with a capital letter because of names.  this macro works but it only goes to the first word then a message box appears

ub RunSpellcheck()

Dim oSection As Section, OriginalRange As Range

Set oDoc = ActiveDocument

'Check what type of protection - if any - has been applied

        If Options.CheckGrammarWithSpelling Then

        Else

            oDoc.CheckSpelling

        End If

        Application.ScreenUpdating = True

        Application.ScreenRefresh

        If oDoc.SpellingErrors.Count = 0 Then

            If Options.CheckGrammarWithSpelling Then

            End If

        End If

        System.Cursor = wdCursorNormal

        End Sub

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

5 answers

Sort by: Most helpful
  1. Anonymous
    2011-09-19T20:51:00+00:00

    scratch that idea.  i just did a test to see what MS would do if it substituted it's best guess and it was a disaster.  i think it never got the right word. I've got a new idea which I'll open on a new thread.

    Was this answer helpful?

    0 comments No comments
  2. Charles Kenyon 167.7K Reputation points Volunteer Moderator
    2011-09-19T20:47:35+00:00

    i want to take my chances about letting the computer take it's basic guess. this is for OCR documents and the docs are 400 pages long and i do this all the time.  i'm tired of reading the same OCR mistakes over and over again.  i have to do a lot of guessing as it is. i'm certain that this will make my reading experience more enjoyable.

    I understand your frustration with he garbage you can get from OCR. I guess I would suggest a better OCR program (and possibly scanner) because Word's spell checking is based, to some extent on the keyboard and regular typing and spelling errors. An OCR program is based on what looks like which letter or word. I can promise you that you'll get some doozies with Word's. Word's guesses will not be based on what the text looks like but on what are common misspellings and close spellings.

    I don't know of any way to get Word's speller to run in batch mode. You would have to be intercepting the messages from the program, responding to them, and continuing. I suspect that if this can be done it would not be a trivial project. You may need to work with some of the people who wrote the spelling checker.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2011-09-19T20:23:20+00:00

    i want to take my chances about letting the computer take it's basic guess. this is for OCR documents and the docs are 400 pages long and i do this all the time.  i'm tired of reading the same OCR mistakes over and over again.  i have to do a lot of guessing as it is. i'm certain that this will make my reading experience more enjoyable.

    Was this answer helpful?

    0 comments No comments
  4. Charles Kenyon 167.7K Reputation points Volunteer Moderator
    2011-09-19T12:11:35+00:00

    I agree with DeanH about not trusting Word's guesses.

    On names, try applying a character style with the language formatting of "do not check spelling or grammar" to the name. This is discussed at http://sbarnhill.mvps.org/WordFAQs/MasterSpellCheck.htm#ExemptingText. Doing so is much simpler than applying a macro and the names will not show up as spelling errors on a different machine.

    The easiest way to create such a character style is to apply the no-proofing formatting to one word and then create a character style by example. To apply the formatting directly select the word and:

    Review > Language > Proofing Language

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2011-09-19T10:16:03+00:00

    "the computer will just replace misspelled words with its best guess" - very dangerous, I would never let Word arbitrarily change any word for its best guess! The wrong word may be similar but could produce the opposite message in the text.

    Was this answer helpful?

    0 comments No comments