To programmatically copy text from the WebBrowser control you can use its ExecWB method, to which you must pass the OLECMDID_COPY constant as its first argument.
WebBrowser1.ExecWB OLECMDID_COPY, OLECMDEXECOPT_DODEFAULT
You can also select the entire WebBrowser's contents by invoking the ExecWB method with the OLECMDID_SELECTALL constant. For example, you can quickly copy the textual contents of the WebBrowser control (that is, plain text instead of HTML text) with the following statements: |
Click here to copy the following block | WebBrowser1.ExecWB OLECMDID_SELECTALL, OLECMDEXECOPT_DODEFAULT
WebBrowser1.ExecWB OLECMDID_COPY, OLECMDEXECOPT_DODEFAULT
WebBrowser1.ExecWB OLECMDID_CLEARSELECTION, OLECMDEXECOPT_DONTPROMPTUSER |
|