Tell Office to ignore code listings (or any text) when running the Spelling and Grammar feature.
A few posts ago, I showed you how to reset the Office Spelling And Grammar feature. You have to reset the feature to recheck the entire document. Today, I want to show you how to skip text while checking for spelling errors. I use this trick when checking documents with code listings. It could also be useful for documents that contain sections of non-English content. In either case, if you check the entire document, the feature is going to stop dozens of times, unnecessarily, when the feature encounters unfamiliar words. The more efficient solution is to skip portions of the document that contain unfamiliar words and phrases, as follows:
The good news...
You won't have to mark the block of text each time you run a spell check.
The bad news...
You will have to unmark the text to spell check it -- that's the hard part. You run the spell check, it skips the text, but you think it simply found no errors in that text, because you've forgotten that you told Spelling And Grammar to skip it. Use this setting with caution. I recommend that you use it only for text that you'll never want to include in a spell check. Or unmark the text as soon as you run the spell check.
Select the block or blocks of text that you want to skip.
From the Tools menu, choose Language and then select Set Language.
Check the Do Not Check Spelling And Grammar option.
Click OK. When you run a spell check, Word (or any Office application) will ignore the marked blocks of text.