|
-
Sep 12th, 2000, 11:50 AM
#1
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.
-
Sep 12th, 2000, 12:14 PM
#2
I'm not sure, but this should work:
Code:
Me.SetFocus
WebBrowser1.SetFocus
SendKeys "^C", True
MsgBox Clipboard.GetText
It worked for me.
-
Sep 12th, 2000, 08:25 PM
#3
I've just tried it but it won't work
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.
-
Sep 13th, 2000, 09:11 AM
#4
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|