I've put the macro in Macro Library. If you find to correct ar make better, I will be happy to learn.
For more information, see the wiki Searching the Forum for Answers section.