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!
If your writing often contains words that include numbers, you'll want to make sure you set up the spelling checker to ...Discover More
Are you bothered by the green underlines that Word uses to mark potential grammar errors in your document? You can hide ...Discover More
Text boxes are a common design element in a document. You may wonder if the text you place in a text box can be spell ...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.