Below is one possible approach.
Function betterCheckSpelling(input as String) as Boolean
Dim Words() as String, i as Long
Dim tempString as String, lenWords as Long
If Len(input)<=255 Then
'if the string is short enough return check spelling result
betterCheckSpelling = Application.CheckSpelling(input)
Else
'otherwise use Split on space to generate an array of short strings
'set the default result of this part of the function to True
betterCheckSpelling = True
Words = Split(input," ")
lenWords = UBound(Words)
For i = 0 to lenWords
'go through each of the short strings and start concatenating together to tempString
'if the current word would cause tempString to be too long; then check spelling.
If (len(tempString)+len(Words(i))) > 255 Then
If Not Application.CheckSpelling(tempString) Then
'if the result is False then we don't need to check further; there's already a problem.
betterCheckSpelling = False
Exit For
Else
'otherwise, if the result is True (meaning OK so far) then restart the string from the current word.
tempString = Words(i)
End If
Else
'if the string hasn't reached the full length yet, keep concatenating
tempString = tempString & " " & Words(i)
End If
Next
If (betterCheckSpelling) Then
'need to do this one last time for the last piece of tempString
betterCheckSpelling = Application.CheckSpelling(tempString)
End If
End If
End Function
Here is a different, recursive approach.
Function recursiveCheckSpelling(input as String) as Boolean
Dim checkLength as Integer, test as String
If Len(input)<=255 Then
'default, short case.
recursiveCheckSpelling = Application.CheckSpelling(input)
Else
checkLength = InstrRev(input," ",255)
test = Left(input,checkLength)
If Application.CheckSpelling(test) Then
'keep going with next part
recursiveCheckSpelling = recursiveCheckSpelling(Right(input,Len(input)-checkLength))
Else
'failed this level of test; no need to continue
recursiveCheckSpelling = False
End If
End if
End Function