The Document object has several members that relate to spelling and grammar:
Begins a spelling and grammar check for the document and displays the Spelling and Grammar dialog box when errors are encountered.
This method begins a spellcheck for the document and displays the Spelling and Grammar dialog box when errors are encountered (with the Check Grammar checkbox cleared).
Once the CheckSpelling method has been executed (or if the user does a spellcheck), Word sets the SpellingChecked property to True. Subsequent calls to CheckSpelling will do nothing unless you first set the SpellingChecked property to False.
The SpellingErrors property returns the ProofreadingErrors collection, which contains Range objects that identify the words in the document that are considered spelling errors.
Note that any reference to this property triggers a behind-the-scenes spellcheck in order to fill the ProofreadingErrors collection (which can take some time). You can verify this simply by creating a new document, filling it with some text that contains some spelling errors and then executing the line:
This will cause Word to do a behind-the-scenes spellcheck so Word can report the count of spelling errors.
By way of example, the program in Example 12-1 prints all of the spelling errors in the active document to a new document. ...