i am trying to spell check my html form.......
this is my code:
<html>
<head>
<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.Document.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>
</head>
<body>
<!--Word.Basic
word.Application-->
<FORM name="frm"><center><TEXTAREA name=x Cols="80" rows="10"></TEXTAREA>
<INPUT TYPE="button" name="Spell Check" value="Spell Check" onClick="frm.x.value=SpellChecker(frm.x.value)"></center>
</form>
</body>
</html>
i am getting an error :
ActiveX compnent can't create object: "word.Application"
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.