Displaying Source Code(s)
|
|
Spell Checker
--------------------------------------------------------------------------------
Description : Use Microsoft word spell checker utility
<SCRIPT LANGUAGE=vbscript>
<!--
'SpellChecker
' PURPOSE: This function accepts Text da
' ta for which spell checking has to be do
' ne.
' Return's Spelling corrected data
'
Function SpellChecker(TextValue)
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=TextValue
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
-->
</SCRIPT> |
|
|