I looked in all the obvious places for this functionality once, but never found it. I've since dabbled with SQL DMO (the object, or COM, interface for Enterprise Manager); if this functionality exists anywhere, it'd be buried in there, but I really think you--that is, all of us--are on our own here.
Philip