IHTMLTxtRange.execCommand("Copy",false,null) fails due to IE settings
Posted
by srirambalaji-s
on Stack Overflow
See other posts from Stack Overflow
or by srirambalaji-s
Published on 2010-04-12T15:48:45Z
Indexed on
2010/04/12
17:43 UTC
Read the original article
Hit count: 281
We have a .Net application that is used for editing/rendering customized HTML documents. It is hosted in IE using the AxSHDocVw.AxWebBrowser controls. We proceed with navigating to "about:blank" page initially then we change the Document by writing our custom values into it. The problem we are facing is the call to IHTMLTxtRange.execCommand("Copy",false,null) is failing if we don't enable the IE Security Settings in the Internet Security zone (Scripting->Allow Programmatic Access to Clipboard ).
In order to bypass the security setting ,I tried to point to a local html file initially while navigating. But this fails as soon as I modify the Document.
I want to use the IHTMLTxtRange.execCommand("Copy",false,null) command so that I can customize our Copy/Paste operations. Is there any other way I can do this. Please share your ideas inorder to overcome this situation. Thanks. Sriram
© Stack Overflow or respective owner