1

I am working on an ActiveX tool that allows users to copy data from it into the system clipboard. The user would then be able to paste data in to Notepad or something like that.

It works fine with IE6 and IE7.

However with IE8 we are getting an error: "Unable to Open Clipboard". Error number is: 20027

Following things were tried, but did not help: 1. Enabled all IE Options. 2. Added and removed site from IE "trusted sites". 3. IE8 compatibility mode.

What's worse is that I haven't found any site that talks about why this error is occurring. It does seem to be 'feature' to protect generic IE user.. but I would like to know its details, so that I can find a workaround.

If you have any idea about what the cause this problem is, or what its possible solution might be, it will be of great help.

thanks!

rk2010
  • 3,481
  • 7
  • 27
  • 39

1 Answers1

1

Web browsers already allow copying to the clipbord themselves with a prompt to the user if required.
How do I copy to the clipboard in JavaScript?
Seeing as you're using an ActiveX control, you're alreayd limited to IE which makes it easy.

As for IE8 protected mode, see the What's new in IE8 and working with protected mode articles.

Community
  • 1
  • 1
Deanna
  • 23,876
  • 7
  • 71
  • 156
  • I tried the window.clipboard declaration. It causes IE to ask me permission for accessing the clipboard, and subsequently I am able to copy paste from Javascript. However, the problem with ActiveX remains. I wonder if there exists a way we can make VB (ActiveX) also ask for permission. Thanks for your input. Those links sure do seem to point me in the right direction. – rk2010 Oct 13 '11 at 18:26