SpellCheckString(ByVal TextToCheck As String, ByVal Startpos As Variant, ByVal Endpos As Variant)
Note: Up from Version2 the Startpos and Endpos has changed from Long to Variant
|
Function:
|
|
|
|
spell check a given string up from the startpos and returns the begin of the first incorrect word.
|
|
|
|
|
|
|
|
|
|
|
       
|
  Syntax:
|
|
|
|
|
JRSpell1.SpellCheckString xText, startpos, endpos
|
|
|
xText
|
string to check.
|
|
|
startpos
endpos
|
check all words up from this position.
check all words up to this position.
|
|
       
|
  Return value:
|
|
|
|
startpos
endpos
Event
|
start position of the first incorrect word. -1 if no incorrect word was found.
end position of the incorrect word.
SpellCheckWord
|
|
|
Example:
|
|
|
Private Sub Command2_Click() 'start with check at characterpos 0 teststart& = 0 teststring$ = Text1.Text findnextincorrectword: 'the jrspell_spellcheckedword event returns the incorrect word 'teststart returns the first characterpos of a incorrect word. returns -1 if no incorrect word was found 'testend returns the last characterpos of a incorrect word
'check the complete string testend& = Len(teststring$) x = JRSpell1.SpellCheckString(teststring$, teststart&, testend&) 'if any incorrect word was found, then search for the next If teststart& <> -1 Then   MsgBox "-->> " + Form1.JRSpell1.SpellInfo_MisspelledWord   teststart& = testend&   GoTo findnextincorrectword End If End Sub
|
|
|