by Allen Wyatt
(last updated April 12, 2014)
Word includes a power spellchecker that allows you to determine which words in a document need your attention. Sometimes, it might be helpful to have all the misspelled words in one place, rather than throughout the document. If you have this need, the following VBA macro will gather all the misspelled words from one document and place them in a new document.
Sub GetSpellingErrors() Dim DocThis As Document Dim iErrorCnt As Integer Dim J As Integer Set DocThis = ActiveDocument Documents.Add iErrorCnt = DocThis.SpellingErrors.Count For J = 1 To iErrorCnt Selection.TypeText Text:=DocThis.SpellingErrors(J) Selection.TypeParagraph Next J End Sub
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (1465) applies to Microsoft Word 97, 2000, 2002, and 2003.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!
Automatic Spell Checking can change your menu options.Discover More
When do you use digits in your prose and when do you spell out the numbers? Why not let Word help you make the decision? ...Discover More
When Word checks the grammar it thinks you are using in your prose, it follows a set of rules. Fortunately the program ...Discover More
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Got a version of Word that uses the menu interface (Word 97, Word 2000, Word 2002, or Word 2003)? This site is for you! If you use a later version of Word, visit our WordTips site focusing on the ribbon interface.