>>oShell = new ActiveXObject("WScript.Shell"); >>oWord = new ActiveXObject("Word.Application"); >> >>oShell.SendKeys("^c"); >> >>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?\n\nClick OK to replace all selected text.", 0, "Spell Check Complete", 33); >> >>if (nRet == 1) { >> oShell.SendKeys("^v") >>} >>