This functionality is part of the suite of tools I wrote some while ago (which I still use every day), "A WorkLife Framework" (
http://scientificarts.com/worklife/).
But I will see in the next couple of days if I can find time to create a funciton that does specifically what you are asking for and which you can add to a palette.
By the way, these days you can have WorkLife under a shareware approach -- I give a license and you can contribute what you wish via PayPal if you find it useful and choose to continue to use it.