This is a Hard question(apparently simple):
How do I COPY the selected text from a webBrowser page, and paste it to a text file( for example)?
I have this until now:
private void webBrowser1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
{
//the 67 is the mousebutton no4 (I have 5 5buttons and a scrolwhell-A4Tech_X7 mouse)
//the mousebutton no4 is set to "ctrl+c" keys (Copy)
if (e.KeyValue == 67)
textBox2.Text=webBrowser1.DocumentText;
}
Until now i cant manage to copy a text selection from webBrowser.
How to do that?
Thank you.
How do I COPY the selected text from a webBrowser page?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Javeed M ShaikhRank #839 · 2.7K reputationPosted Nov 5, 2011, 5:51 PM EDT
try this...
webBrowser1.Document.ExecCommand("Copy", false, null);
textBox2.Text = Clipboard.GetText();
toto11 reputationPosted Nov 5, 2011, 5:53 PM EDT