webBrowser.Document.ExecCommand("Copy", false, null) not working C#

Srinivas Merugu (Optum Software) 0 Reputation points

Hi Team, webBrowser.Document.ExecCommand("Copy", false, null); is not working and not able to paste the content in richtextbox in C#. It is not copying into clipboard too. Do you have any idea? Kindly suggest. Thanks, Srinivas Merugu

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,363 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Jiachen Li-MSFT 26,921 Reputation points Microsoft Vendor

    Hi, @Srinivas Merugu (Optum Software) ,

    Make sure you select the content you want to copy before using webBrowser.Document.ExecCommand("Copy", false, null).

    Use webBrowser.DocumentText to check that all the text in the page has loaded.

    Best Regards.

    Jiachen Li

    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments