Copy highlighted text and replace it using AppleScript
This might do the trick:

on run
    tell application "System Events"
        keystroke "c" using command down
    end tell

    tell application "Finder"
        set x to the clipboard
        set x to "Today " &amp; x &amp; " a sunny day"
        set the clipboard to x
    end tell

    tell application "System Events"
        keystroke "v" using command down
    end tell
end run


Though it might be better to write the script without using the clipboard (i.e., without copying and pasting), but that requires involvement of the application(s) you are working with, and you did not tell us which ones they are.