'** '* checkSpell.vbs '* '* $Header: /JavaScript/checkSpell.vbs 1 7/11/05 10:53 Ds $ '* $Revision: 1 $ '* Copyright 1996-2003 Monitor Management Control Systems Ltd. '* $Log: /JavaScript/checkSpell.vbs $ '* '* 1 7/11/05 10:53 Ds '* '* 1 5/07/04 9:31 Gc '* 2008420 '* '* This file is deliverable to clients. '* '* Amendment History '* '* Who When Why '* GC 05-07-04 2008631 : File Created '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * function SpellChecker(textToCheck) Dim objWordobject Dim objDocobject Dim strReturnValue 'Create a new instance of word Application Set objWordobject = CreateObject("word.Application") objWordobject.WindowState = 2 objWordobject.Visible = True 'Create a new instance of Document Set objDocobject = objWordobject.Documents.Add( , , 1, True) objDocobject.Content=textToCheck objDocobject.CheckSpelling 'Return spell check completed text data strReturnValue = objDocobject.Content 'Close Word Document objDocobject.Close False 'Set Document To nothing Set objDocobject = Nothing 'Quit Word objWordobject.Application.Quit True 'Set word object To nothing Set objWordobject= Nothing SpellChecker=strReturnValue End function