Something I came across over at Brian Madden's site:
http://www.brianmadden.com/content/content.asp?id=482 Although it would appear that this is only applicable to CPS 4, so if you have anything earlier than this it's quite possible that it won't work.
I don't have anything available to test this on at the moment, so I'd be very interested in seeing some sample output at some stage?