How to: Check Spelling in Worksheets
Applies to |
---|
The information in this topic applies only to the specified Visual Studio Tools for Office projects and versions of Microsoft Office. Project type
Microsoft Office version
For more information, see Features Available by Application and Project Type. |
You can programmatically check the spelling of words in a worksheet. The Spelling dialog box automatically appears if there are any incorrectly spelled words in the worksheet.
To check spelling in a worksheet in a document-level customization
Call the CheckSpelling method of the worksheet.
Globals.Sheet1.CheckSpelling()
Globals.Sheet1.CheckSpelling(missing, missing, missing, missing);
To check spelling in a worksheet in an application-level add-in
Call the CheckSpelling(Object, Object, Object, Object) method of the active worksheet.
CType(Application.ActiveSheet, Excel.Worksheet).CheckSpelling()
((Excel.Worksheet)Application.ActiveSheet).CheckSpelling (missing, missing, missing, missing);
See Also
Tasks
How to: Run Excel Calculations Programmatically
Concepts
The Variable missing and Optional Parameters in Office Solutions
Change History
Date |
History |
Reason |
---|---|---|
July 2008 |
Added a code example that can be used in an application-level add-in. |
Customer feedback. |