Checking Spelling

When used with the Word or Excel Application object, the CheckSpelling method checks the spelling of a single word using the following syntax (note that Word's method has a few extra arguments):

Application.CheckSpelling(word,customDictionary¬°ignoreUppercase) word The word you want to check.

customDictionary The filename of a custom dictionary that the application can search if word wasn't found in the main dictionary.

ignoreUppercase Set to True to tell the application to ignore words entirely in uppercase.

For example, the code shown in Listing 5.5 gets a word from the user, checks the spelling, and tells the user whether or not the word is spelled correctly. (You also can use this property with a Document, Worksheet, or Range object, as described in Chapter 7, "Programming Word," and 8, "Programming Excel.")

‚Ė† To learn about the inputBox function, see "Getting Input Using inputBox," p. 50.

0 0

Post a comment