Thanks, Peter. That was the (obvious) Action I was missing.
Here is my final macro:
For more information, see the wiki Searching the Forum for Answers section.