Quote from ologCan't test this right now but I'm guessing that a macro containing something like this could work:
Thanks Olog. Sadly attempting that script gives the standard "script has been blocked from an action only available to the Blizzard UI." message. Would have been nice if it had worked, it's a lot cleaner looking than the other Macro.