Matt B
20-08-2002, 14:21/02:21PM
If you are like me, you go back and edit your posts constantly to fix spelling, grammatical errors, etc.
One of my programmers gave me a script today that will automatically spell check text that you have written in a text box on a form.
Take the following code:
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
}
1. copy to notepad
2. save as spellcheck.js in the c:temp directory
3. open IE
4. open windows explorer, browse to the c:temp directory
5. click and drag the spellcheck.js file into your links on the IE browser.
The next time you are composing a message select all of the mesage in the text box, then copy.
Click the spellcheck link on your browser.
Word will automatically open, spellcheck, select replace text, and the text you have written will automatically change and word will close.
very cool. :cool:
One of my programmers gave me a script today that will automatically spell check text that you have written in a text box on a form.
Take the following code:
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
}
1. copy to notepad
2. save as spellcheck.js in the c:temp directory
3. open IE
4. open windows explorer, browse to the c:temp directory
5. click and drag the spellcheck.js file into your links on the IE browser.
The next time you are composing a message select all of the mesage in the text box, then copy.
Click the spellcheck link on your browser.
Word will automatically open, spellcheck, select replace text, and the text you have written will automatically change and word will close.
very cool. :cool: