Client Side Spell Checker
I was looking for a spell checking tool that I could use to edit my posts. I know nothing about java script but I found the code below on the web. I added a link to it in my IE Links bar and when I click that link I get an error message that says it can't find one of the components. It goes ahead and displays the spell check window anyhow, but it highlights the oShell in the first line of the js file rather than any text on the web page. Can someone tell me what's wrong and also how to change it so that it would only check text that I've selected?
oShell= new ActiveXObject("WScript.Shell");
oShell.SendKeys( "^c" ); // copy
oWord= new ActiveXObject("Word.Application");
oWord.Visible= true;
oWord.Documents.Add();
oWord.Selection.Paste();
oWord.ActiveDocument.CheckSpelling();
oWord.Selection.WholeStory();
oWord.Selection.Copy();
oWord.ActiveDocument.Close(0);
oWord.Quit();
var nRet= oShell.Popup("Apply changes?\nClick OK to replace all selected text.",0,"Spell Check Complete",33 );
if ( nRet == 1 ) {
oShell.SendKeys( "^v" ); // paste
}