Take a look at this macro and see if it will work for you, or at least give you some ideas of how to do that:
For more information, see the wiki Searching the Forum for Answers section.