I have just moved the solution/macro I posted earlier to a new topic. You can find it here:
For more information, see the wiki Searching the Forum for Answers section.