G
Guest
Hello !
I use Borland C++ Builder, and I use the TCppWebBrowser component, which is
a wrapper around IE. The code I will post will be BCB, but it should be
easily understandable to people familiar with IE.
Before upgrading to WinXP SP2, to following code was working well :
// select all
Browser->ExecWB(OLECMDID_SELECTALL, OLECMDEXECOPT_DODEFAULT);
// copy to the clipboard
Browser->ExecWB(OLECMDID_COPY, OLECMDEXECOPT_DODEFAULT);
// unselect everything
Browser->ExecWB(OLECMDID_CLEARSELECTION, OLECMDEXECOPT_DODEFAULT);
However, since I upgraded to SP2, the "copy" line does not work anymore...
I tried another approach using something like :
Variant vBody = vDocument.OlePropertyGet("Body");
Variant vTextRange = vBody.OleFunction("CreateTextRange");
vTextRange.OleProcedure("Select");
Variant vResult = vTextRange.OleFunction("ExecCommand","Copy");
But vResult returns always false, and nothing is copied to the clipboard.
Is there something I missed ?
Thanks for advance for your help !
I use Borland C++ Builder, and I use the TCppWebBrowser component, which is
a wrapper around IE. The code I will post will be BCB, but it should be
easily understandable to people familiar with IE.
Before upgrading to WinXP SP2, to following code was working well :
// select all
Browser->ExecWB(OLECMDID_SELECTALL, OLECMDEXECOPT_DODEFAULT);
// copy to the clipboard
Browser->ExecWB(OLECMDID_COPY, OLECMDEXECOPT_DODEFAULT);
// unselect everything
Browser->ExecWB(OLECMDID_CLEARSELECTION, OLECMDEXECOPT_DODEFAULT);
However, since I upgraded to SP2, the "copy" line does not work anymore...
I tried another approach using something like :
Variant vBody = vDocument.OlePropertyGet("Body");
Variant vTextRange = vBody.OleFunction("CreateTextRange");
vTextRange.OleProcedure("Select");
Variant vResult = vTextRange.OleFunction("ExecCommand","Copy");
But vResult returns always false, and nothing is copied to the clipboard.
Is there something I missed ?
Thanks for advance for your help !