If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

I tried the code you suggested. In this case I have to copy the selected text manually, is there a way to have a function (like a button click) do the copying of the selected text from another open application?

Like, I open up a word document, highlight some lines, then when I click a button in my vb.net program, the selected text is automatically put on the clipboard so that i can get it into my form?

After knowing all the above, the things you need to do is
1. Creating an Office add-in to get the selected text in the application
2. Add the necessary remoting module/code to the add-in and your program
3. Install the Office add-in
4. Run your program