Here you go:
I'll probably make this into a plugin, so it's easy to pass a parameter to the executed macro, but this sould work for now.
For more information, see the wiki Searching the Forum for Answers section.