Possible Duplicate:
How can an app hook into text selection system-wide?
I’m going to be creating a look up program that will probably be operating similar to a Windows Shell kind of application. In Outlook, I’m going to select an ID number (text) and my application needs to accept that as an argument to do things with that.
How can I access the selected text on a global (Windows) scale?
My workaround is probably to execute a Copy action then read the Clipboard’s contents. But I’d like to keep that free if possible.
See the solution in this thread: Copy Selected Text from any window
Basically, you will need to use PInovoke to get the selected text from the active window. Additionally, you could set up a windows key binding to run your application and trigger the action. This approach has the added benefit of working for all applications, not just Outlook.