Hello,
You can do it by using OLE automation.
First add a COM reference to SHDocVw. If you don't have the interop, VS can create it for you automatically, In the tool box, select "Select Items", then in the Com component select Microsoft Web Browser, drag a Microsoft Web Browser on you form and delete it, this make VS creates all the interops and add all the references you will need.
And this is the code:
SHDocVw.ShellWindows shellWindows = new ShellWindowsClass();
foreach (SHDocVw.InternetExplorer ie in shellWindows)
{
if (!String.IsNullOrEmpty(ie.LocationURL))
{
ie.ExecWB(OLECMDID.OLECMDID_SELECTALL, OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER);
ie.ExecWB(OLECMDID.OLECMDID_COPY, OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER);
}
}
Be aware that you will need to test LocationURL has the loop will return ie windows as well as Windows explorer windows.
Valery.