karfast

Hi:

I have a web page with an embedded ActiveX control. The control gets data from a server and presents it in a RTF format.

I would like to add a menu / button that will copy the RTF contents of the display area of this control, and paste the clipboard contents to my database.

Am a beginner and request tips on how to do this.

TIA

Kar



Re: Internet Explorer Extension Development Copying data from activeX control

IECUSTOMIZER

Hi Fast Car,

You could add a method to your ActiveX control to copy the data to the clipboard (and specify RTF as the data format) or use javascript:

Here is a javascript prototype

1. Use an hidden div id=holdtext to hold the RTF contents of your ActiveX

function ClipBoard()

{

holdtext.innerText = myActiveX.innerText;

Copied = holdtext.createTextRange();

Copied.execCommand("Copy");

}

This is not a difinitive solution as IE versions greater than 6/SP 1 have user settings to allow scripting of the WebBrowser control... execCommand will not work in these situations. If this is for an internal intranet implementation, then you can ensure with Group Policy that this setting is enabled for your users.

Regards.






Re: Internet Explorer Extension Development Copying data from activeX control

karfast

Hi IEC,

Thanks for your reply. The ActiveX is on somebody else's site. I am building a tool on my local machine to grab content from within the ActiveX. So I cannot add a method to the ActiveX. I however can control scripting on my local machine.

Is there a way to grab Rich, Formatted Text from this activeX

TIA

Kar





Re: Internet Explorer Extension Development Copying data from activeX control

IECUSTOMIZER

Hi Fast Car,

Only if the ActiveX control has an exposed method or property that allows you to grab it. I would intall it locally and then use the object browser of your IDE to view its object model for the exposed methods and properties.

Regards.