|
About this macro:
Before I even begin my explanation, I feel compelled to provide a clear and thorough DISCLAIMER about the likely result of running this macro.
At first glance, you would probably expect that this macro would correct any misspelled words in your document. While that is technically true, it's really only half of the story. This macro will successfully replace most or all of the errors in a document with correctly spelled words. The problem lies in which new words will be inserted in place of the erroneous words. To illustrate, consider the following example: imagine that as you are typing, you accidentally move your right hand slightly to the right, and instead of typing "while," you actually type "wjo;e." In this case, there is no way that Word will accurately determine your original intent. In all likelihood, Word will try to replace "wjo;e" with woe, woke, or whose.
Because of common occurrences like the one I just described, this macro is actually inferior to the Spelling function already included with Word (look for it on the "Tools" menu).
Inferior?!
Ahem... Perhaps I should now explain why I would write a macro that would weaken one of Word's capabilities rather than build on or improve some part of Word. Well, the main reason that I wrote the macro was that someone asked me to. Believe it or not, a subscriber to the question-and-answer website Experts Exchange specifically inquired about creating a macro to "replace each misspelled word with the top correction suggested by the spell checker." If you are interested in viewing the original discussion on the Experts Exchange website, try the following links:
The original question, followed by my response: www.experts-exchange.com/Applications/MS_Office/Word/Q_21118688.html#11977901
The list of all macros I have written for Experts Exchange members:
www.experts-exchange.com/AH_3424423.html
As far as I know, the person that was seeking the spell-check macro ultimately found that my macro fulfilled his requirements. Unfortunately, I never did ask him exactly what he planned to do with it. Therefore, this is the only macro on my website that merits a disclaimer, because it is the only one for which I cannot clearly articulate a compelling purpose.
After mulling over the possibilities, the only feasible purpose I could see for this macro would be the conversion/translation of a British English text into American English, or some other similar "dialect conversion." Of course, when I say "conversion/translation," that is probably too lofty a term to use. The conversion that would occur would be limited to spelling only. Clearly, the macro would be powerless to convert British idioms to their American equivalents. I have indeed tested this macro as a British to American conversion tool, and it produced encouraging results. My "test" consisted of pasting a British article from a website into Word and then running the macro. Because the article had presumably been edited prior to being published, it contained no spelling errors per se. However, in my version of Word the language has been set to "English (U.S.)." Accordingly, British spelling variants such as "organisation" and "behaviour" were underlined in red to indicate that (in American English) they are misspelled. Fortunately, "organisation" is so close in spelling to "organization" that Word was capable of accurately predicting the desired correction. Nonetheless, my testing in this area has been extremely limited. By no means can I guarantee the effectiveness of this macro for such a purpose.
Therefore, I have decided to include this macro on my website mainly as a demonstration of the type of code you would need if you should ever set out to tinker with Word's spelling features. Perhaps you could harness Word's spelling suggestions in conjunction with an essay or a list of sentences to create a mini spelling test game. Or perhaps you could alter this macro to simply collect data on the misspellings in a document in order to study, quantify, and classify common variations of typing errors.
Be creative! The skies the limit! Umm, rather... The sky's the limit!
Thanks for reading about my macro!
-Kelly |