Mail: Capture highlighted text in message body, change, and replace

My purpose is to be able to highlight text in a Mail message when creating it, change its case, and replace the original highlighted text. There were elaborate scripts in 2005 to change the case of text supplied to the script but none that took text from Mail and replaced it automatically. I have a simple script that allows me to copy and paste into a dialog box the script I want changed and then do the reverse with the result. I can not find any property of text, word, or character that relates to highlighted text in a Mail message that I can use to do this function automatically without the manual copy & paste steps.

Does anyone know if it is possible to capture highlighted text in Mail with AppleScript?

Thanks,
StanfordLZ

Model: Mini
AppleScript: 1.10.7
Browser: Safari 531.9
Operating System: Mac OS X (10.4)