IsCorrect Function:

The IsCorrect Function checks the spelling of a string. IsCorrect returns True if the input phrase or word is spelled correctly or False if the phrase contains one or more words spelled incorrectly. IsCorrect requires you to install a free java class file (SpellCheck.class) onto your server. The installation instructions and java files can be found here. IsCorrect returns Null if the required files cannot be found on the server.

Syntax:
boolean = IsCorrect( string )
Example Usage:
<%
Dim boolSpelledRight
 ' returns False
boolSpelledRight = IsCorrect( "My doog has flees." )

 ' returns True
boolSpelledRight = IsCorrect( "My dog has fleas." )
%>
ASP Source Code:
<%
Private Function IsCorrect(byVal string)
	Dim sc, tmp, i, tmp2, out, ct
	On Error Resume Next
	Set sc = GetObject("java:SpellCheck")
	sc.LoadDictionary _
		server.mappath("/dictionary.txt")
	If Err Then
		IsCorrect = Null
		Exit Function
	End If
	On Error GoTo 0
	sc.SetHighlights "<BAD>", "</BAD>"
	tmp = sc.CheckSpelling(string)
	Set sc = Nothing
	tmp2 = Split( Trim( tmp ), " " )
	ct = 0
	for i = 0 to UBound( tmp2 )
		if instr( tmp2( i ), "<BAD>" ) Then
			IsCorrect = False
			Exit Function
		end if
	next
	IsCorrect = True
End Function
%>