For anyone who put this in their toolbox, I've made some improvements and posted it in the Macro Library:
For more information, see the wiki Searching the Forum for Answers section.