By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,578 Members | 1,617 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,578 IT Pros & Developers. It's quick & easy.

webbrowser copy and paste...

P: n/a
using webbrowser control. i am not getting thing to work with copy and
paste, but select all work fine .

for copy event
Private Sub MenuItem24_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MenuItem24.Click
AxWebBrowser1.ExecWB(SHDocVw.OLECMDID.OLECMDID_COP Y,
SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DODEFAULT)
End Sub

for paste event
Private Sub MenuItem23_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles MenuItem23.Click
AxWebBrowser1.ExecWB(SHDocVw.OLECMDID.OLECMDID_CUT ,
SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DODEFAULT)
End Sub

Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Supra,

This is in my opinion an easier one. It needs an reference to MSHTML no
import.

This is the save as look for the other commands like cut, copy and paste and
others to the link I show beneath it.
\\\
DirectCast(oDocument, mshtml.IHTMLDocument2).execCommand("SaveAS", False,
"c:\frame0.htem")
///

http://msdn.microsoft.com/library/de...xeccommand.asp

I hope this helps?

Cor
Nov 21 '05 #2

P: n/a
Hi Supra,

Can you please help me out. I want to do Select All operation which i am not able to perform. Can you please send me the code snippet on vi******@yahoo.com. Its very urgent. Thanks.
using webbrowser control. i am not getting thing to work with copy and
paste, but select all work fine .

for copy event
Private Sub MenuItem24_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MenuItem24.Click
AxWebBrowser1.ExecWB(SHDocVw.OLECMDID.OLECMDID_COP Y,
SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DODEFAULT)
End Sub

for paste event
Private Sub MenuItem23_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles MenuItem23.Click
AxWebBrowser1.ExecWB(SHDocVw.OLECMDID.OLECMDID_CUT ,
SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DODEFAULT)
End Sub


User submitted from AEWNET (http://www.aewnet.com/)
Nov 21 '05 #3

P: n/a
IHTMLDocument2::execCommand can do copy and paste. ExecWB does not
perform that task anymore (I dont know why). i don't know vb. you need
to get IHTMLDocument2 interface of the object, then perform execCommand
of returned IHTMLDocument2.

Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.