S
shalpern
Has anyone seen this problems or know how to correct it?
Using the following code to copy text from the Clipboard into MS Word
At point "A":
alert(window.clipboardData.getData("Text"));
I see the text from the Clipboard.
At point "B"
alert(window.clipboardData.getData("Text"));
The value "null" is displayed.
I have tried this on other systems and it works fine.
I have compared the MS Word Settings and they are the same.
<html>
<head>
</head>
<body>
<SCRIPT LANGUAGE=JavaScript>
oShell= new ActiveXObject("WScript.Shell");
alert("Point A");
alert(window.clipboardData.getData("Text"));
oWord= new ActiveXObject("Word.Application");
alert("Point B");
alert(window.clipboardData.getData("Text"));
oWord.Visible= true;
alert("Point C");
alert(window.clipboardData.getData("Text"));
oWord.Documents.Add();
alert("Point D");
alert(window.clipboardData.getData("Text"));
oWord.Selection.Paste();
oWord.Quit();
close()
</script>
</body>
</html>
Any Help would be greatly appreciated.
Thanks in Advance,
Using the following code to copy text from the Clipboard into MS Word
At point "A":
alert(window.clipboardData.getData("Text"));
I see the text from the Clipboard.
At point "B"
alert(window.clipboardData.getData("Text"));
The value "null" is displayed.
I have tried this on other systems and it works fine.
I have compared the MS Word Settings and they are the same.
<html>
<head>
</head>
<body>
<SCRIPT LANGUAGE=JavaScript>
oShell= new ActiveXObject("WScript.Shell");
alert("Point A");
alert(window.clipboardData.getData("Text"));
oWord= new ActiveXObject("Word.Application");
alert("Point B");
alert(window.clipboardData.getData("Text"));
oWord.Visible= true;
alert("Point C");
alert(window.clipboardData.getData("Text"));
oWord.Documents.Add();
alert("Point D");
alert(window.clipboardData.getData("Text"));
oWord.Selection.Paste();
oWord.Quit();
close()
</script>
</body>
</html>
Any Help would be greatly appreciated.
Thanks in Advance,