As luck would have it, I finally got around to posting a macro here that may cover your needs. I saw your post subsequently
For more information, see the wiki Searching the Forum for Answers section.