Class SpellingOptions (Excel VBA)

The class SpellingOptions represents the various spell checking options for a worksheet.

Properties

ArabicModes returns or sets the mode for the Arabic spelling checker.

Sub SpellCheck() 
 
 If Application.SpellingOptions.ArabicModes <> xlArabicBothStrict Then 
 Application.SpellingOptions.ArabicModes = xlArabicBothStrict 
 MsgBox "Spell checking for Arabic mode has been changed to a strict setting." 
 Else 
 MsgBox "Spell checking for Arabic mode is already in a strict setting." 
 End If 
 
End Sub

ArabicStrictAlefHamza returns or sets whether the spelling checker uses rules regarding Arabic words beginning with an alef hamza.

ArabicStrictFinalYaa returns or sets whether the spelling checker uses rules regarding Arabic words ending with the letter yaa.

ArabicStrictTaaMarboota returns or sets whether the spelling checker uses rules to flag Arabic words ending with haa instead of taa marboota.

BrazilReform returns or sets the mode for checking the spelling of Brazilian Portuguese.

DictLang selects the dictionary language used when Microsoft Excel performs spelling checks.

Sub LanguageSpellCheck() 
 
 With Application.SpellingOptions 
 .DictLang = 1033 ' United States English language number. 
 .UserDict = "CUSTOM.DIC" 
 End With 
 
End Sub

GermanPostReform true to check the spelling of words by using the German post-reform rules. False cancels this feature.

Sub SpellingCheck() 
 
 ' Determine if spelling check for German words is using post-reform rules. 
 If Application.SpellingOptions.GermanPostReform = False Then 
 Application.SpellingOptions.GermanPostReform = True 
 MsgBox "German words will now use post-reform rules." 
 Else 
 MsgBox "German words using post-reform rules has already been set." 
 End If 
 
End Sub

HebrewModes returns or sets the mode for the Hebrew spelling checker.

Sub CheckHebrewMode() 
 
 ' Determine the Hebrew spelling mode setting and notify user. 
 Select Case Application.SpellingOptions.HebrewModes 
 Case xlHebrewFullScript 
 MsgBox "The Hebrew spelling mode setting is Full Script." 
 Case xlHebrewMixedAuthorizedScript 
 MsgBox "The Hebrew spelling mode setting is Mixed Authorized Script." 
 Case xlHebrewMixedScript 
 MsgBox "The Hebrew spelling mode setting is Mixed Script." 
 Case xlHebrewPartialScript 
 MsgBox "The Hebrew spelling mode setting is Partial Script." 
 End Select 
 
End Sub

IgnoreCaps false instructs Microsoft Excel to check for uppercase words; True instructs Excel to ignore words in uppercase when using the spelling checker.

Sub SpellingOptionsCheck() 
 
 If Application.SpellingOptions.IgnoreCaps = True Then 
 MsgBox "Spelling options for checking uppercase words is disabled." 
 Else 
 MsgBox "Spelling options for checking uppercase words is enabled." 
 End If 
 
End Sub

IgnoreFileNames false instructs Microsoft Excel to check for Internet and file addresses; True instructs Excel to ignore Internet and file addresses when using the spell checker.

Sub SpellingOptionsCheck() 
 
 If Application.SpellingOptions.IgnoreFileNames = True Then 
 MsgBox "Spelling options for checking Internet and file addresses is disabled." 
 Else 
 MsgBox "Spelling options for checking Internet and file addresses is enabled." 
 End If 
 
End Sub

IgnoreMixedDigits false instructs Microsoft Excel to check for mixed digits; True instructs Excel to ignore mixed digits when checking spelling.

Sub SpellingOptionsCheck() 
 
 If Application.SpellingOptions.IgnoreMixedDigits = True Then 
 MsgBox "Spelling options for checking mixed digits is disabled." 
 Else 
 MsgBox "Spelling options for checking mixed digits is enabled." 
 End If 
 
End Sub

KoreanCombineAux when set to True, Microsoft Excel combines Korean auxiliary verbs and adjectives when spelling is checked.

Sub KoreanSpellCheck() 
 
 If Application.SpellingOptions.KoreanCombineAux = True Then 
 MsgBox "The option to combine Korean auxiliary verbs and adjectives while checking spelling is on." 
 Else 
 MsgBox "The option to combine Korean auxiliary verbs and adjectives while checking spelling is off." 
 End If 
 
End Sub

KoreanProcessCompound when set to True, this enables Microsoft Excel to process Korean compound nouns when using the spelling checker.

Sub KoreanSpellCheck() 
 
 If Application.SpellingOptions.KoreanProcessCompound = True Then 
 MsgBox "The spell checking feature to process Korean compound nouns is on." 
 Else 
 MsgBox "The spell checking feature to process Korean compound nouns is off." 
 End If 
 
End Sub

KoreanUseAutoChangeList when set to True, this enables Microsoft Excel to use the auto-change list for Korean words when using the spelling checker.

Sub KoreanSpellCheck() 
 
 If Application.SpellingOptions.KoreanUseAutoChangeList = True Then 
 MsgBox "The spell checking feature to auto-change Korean words is on." 
 Else 
 MsgBox "The spell checking feature to auto-change Korean words is off." 
 End If 
 
End Sub

PortugalReform returns or sets the mode for checking the spelling of European Portuguese.

RussianStrictE returns or sets whether the spelling checker uses rules regarding Russian words containing the character ë.

SpanishModes returns or sets the mode for checking the spelling of Spanish.

SuggestMainOnly when set to True, instructs Microsoft Excel to suggest words from only the main dictionary when using the spelling checker. False removes the limits of suggesting words from only the main dictionary when using the spelling checker.

Sub UsingMainDictionary() 
 
 ' Check the setting of suggesting words only from the main dictionary. 
 If Application.SpellingOptions.SuggestMainOnly = True Then 
 MsgBox "Spell checking option suggestions will only come from the main dictionary." 
 Else 
 MsgBox "Spell checking option suggestions are not limited to the main dictionary." 
 End If 
 
End Sub

UserDict instructs Microsoft Excel to create a custom dictionary to which new words can be added when performing spelling checks on a worksheet.

Sub SpecialWord() 
 
 Application.SpellingOptions.UserDict = "Custom1.dic" 
 MsgBox "The custom dictionary is currently set to: " _ 
 & Application.SpellingOptions.UserDict 
 
End Sub