Here's an old post with a routine like that from David Swain - https://lists.omnis-dev.com/pipermail/omnisdev-en/2011-April/017111.html Kelly