Share via


SpellingOptions Object

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Application
Aa168065.parchild(en-us,office.10).gifSpellingOptions

Represents the various spell checking options for a worksheet.

Using the SpellingOptions object

Use the SpellingOptions property of the Application object to return a SpellingOptions object.

Once a SpellingOptions object is returned, you can use its following properties to set or return various spell checking options.

The following example uses the IgnoreCaps property to disable spell checking for words that have all capitalized letters. In this example, "Testt", but not "TESTT", is identified by the spell checker.

  Sub IgnoreAllCAPS()

    ' Place mispelled versions of the same word in all caps and mixed case.
    Range("A1").Formula = "Testt"
    Range("A2").Formula = "TESTT"

    With Application.SpellingOptions
        .SuggestMainOnly = True
        .IgnoreCaps = True
    End With

    ' Run a spell check.
    Cells.CheckSpelling

End Sub