Hi all,
I'm trying to set the content of the clipboard to be the words selected within the WebBrowser object. I've tried SendKeys "^C" but it didn't work. Anybody knows how to do this?
Thanks for any help.
Rgds,
David.
Printable View
Hi all,
I'm trying to set the content of the clipboard to be the words selected within the WebBrowser object. I've tried SendKeys "^C" but it didn't work. Anybody knows how to do this?
Thanks for any help.
Rgds,
David.
I'm not sure, but this should work:
It worked for me.Code:Me.SetFocus
WebBrowser1.SetFocus
SendKeys "^C", True
MsgBox Clipboard.GetText
I tried it, but it didn't work
What I want to do is for user to highlight words within the WebBrowser object by drag-select the mouse and then click a "Find" button. Therefore I need to capture the words which is highlighted by user which is supposed to be stored in the clipboard.
Is there any other way to do it besides SendKeys "^C" ?
If sendkeys is the only way to capture the highlighted words, what is the proper way to code it?
Any help is very appreciated.
Rgds,
David.
First of all, my mistake, you should lose the line "Me.SetFocus", I wrote it here before I got the code to work, so it shouldn't be there.
I'll try to find some other solution.