Microsoft KB Archive/826008

= Data That You Copy by Using the setData Method Is Not Pasted in Rich Text Applications =

Article ID: 826008

Article Last Modified on 11/15/2007

-

APPLIES TO


 * Microsoft Internet Explorer (Programming) 6 (SP1)

-





SYMPTOMS
When you use the window.clipboardData.setData method to programmatically copy text to the Clipboard, incorrect text is pasted in Rich Text-compliant applications such as Microsoft Word. This behavior occurs if you manually copy text from a Web page to the Clipboard by clicking Copy on a shortcut menu or by using the Edit menu in Microsoft Internet Explorer, and then you call window.clipboardData.setData to copy some other text programmatically to the Clipboard.



RESOLUTION
A supported hotfix is now available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next service pack that contains this hotfix.

To resolve this problem, submit a request to Microsoft Online Customer Services to obtain the hotfix. To submit an online request to obtain the hotfix, visit the following Microsoft Web site:

http://go.microsoft.com/?linkid=6294451

Note If additional issues occur or any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. To create a separate service request, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

The English version of this hotfix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.

 Date         Time   Version        Size       File name 02-Oct-2003 20:26  6.0.2800.1269  2,799,104  Mshtml.dll This hotfix is included in the following security update:

http://www.microsoft.com/technet/security/bulletin/MS03-048.mspx



STATUS
Microsoft has confirmed that this is a problem in Microsoft Internet Explorer 6 Service Pack 1.



Steps to reproduce the behavior
  Paste the following code in Notepad, and then save the file as Test.htm :    function copy { window.clipboardData.setData(&quot;Text&quot;,&quot;My text in setData&quot;); }    Copy this text first <INPUT onclick=copy type=button value=&quot;Then click this button to copy the data by using the setData function.&quot; name=button1> </BODY> </HTML> </li> <li>Select the &quot;Copy this text first&quot; text on the page, and then copy it to the Clipboard by clicking Copy on the shortcut menu, or by clicking Copy on the Edit menu in Internet Explorer.</li> <li>Click Then click this button to copy the data by using the setData function to copy the &quot;My text in setData&quot; text by calling window.clipboardData.setData.</li> <li>Open any Rich Text editor, such as Word or WordPad, and then try to paste the text that is in the Clipboard. Notice that the correct text is not pasted. The &quot;Copy this text first&quot; text that you manually copied to the Clipboard is pasted, instead of the &quot;My text in setData&quot; text that you copied later by using the setData method. To paste the correct text, click Paste Special on the Edit menu. In the Paste Special dialog box, click Unformatted Text.</li></ol>

Keywords: kbhotfixserver kbqfe kbhotfixserver kbqfe kbie600sp2fix kbie600presp2fix kbfix kbbug KB826008

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.