Monday, August 17, 2009

Word and Spell Checking Redux

In the last installment, I shared an uncommon issue with spell checking in Word documents. I also shared a solution, however unsavory and tedious it may be. To recap, from time to time one may run across documents in which proofing (spell and grammar checking) is disabled in certain pages, sections and/or paragraphs.

This may be overcome by marking the problem area and selecting "Clear All Formatting" under Styles and then reformatting. While I admit that this solution is not ideal, it is certainly better than reformatting the entire document.

My approach with to the problem was the same as my approach to any other. Once the problem is identified, find a solution quickly. This solution is not usually going to be easy to implement. However, it is always workable. Once that workable solution is discovered, pass it on to the users that need to use it. This is usually met with groans, but again, it is a solution.

Then, the real fun begins. Since the users have a workable solution, I can work on a solution that is more elegant, easier to perform and implement. In this case, a macro! That's right, a macro. It turns out that the macro solution for this particular problem is, well, really short. One line of code, in fact. Create a new macro called Enable_Proofing and add the code:

Sub Enable_Proofing()
'
' Enable_Proofing Macro
'

ActiveDocument.Content.NoProofing = False

End Sub
Simply add this macro to your Normal.dot template so that it will always be available. No style clearing or reformatting required. The macro simply removes all NoProofing flags from the active document.

I love it when a plan comes together!

No comments:

Post a Comment