in reply to text highlight or modification.

If its possible for the many different versions of MSWord/wordpad/notepad to have a reliable way of accomplishing what you're after, you would use Win32::OLE/Win32::GuiTest.