Greetings all.
I've stolen/used this code as a spell checker on forms.
What I want to do is:
-loop through specific fields in a recordset
-log every spelling error (and its associated field) in a table
-display the results in a form
-return a count of the errors found
need help with the bold part.
I did a little reading, but it looks like all DoCmd.RunComman d acCmdSpelling does is launch the equivalent of a the spell checker--which, I don't believe, I can manipulate/capture.
So, how does the spell checker work? I imagine one could write code to capture a string of consecutive characters (i.e. a space before and after) and check that string against some sort of MS Office dictionary.
Any ideas how to do that?
I've stolen/used this code as a spell checker on forms.
Code:
Dim strSpell
strSpell = myField.Value
If IsNull(Len(strSpell)) Or Len(strSpell) = 0 Then
Exit Sub
End If
With myField
.SetFocus
.SelStart = 0
.SelLength = Len(strSpell)
End With
DoCmd.SetWarnings False
DoCmd.RunCommand acCmdSpelling
DoCmd.SetWarnings True
-loop through specific fields in a recordset
-log every spelling error (and its associated field) in a table
-display the results in a form
-return a count of the errors found
need help with the bold part.
I did a little reading, but it looks like all DoCmd.RunComman d acCmdSpelling does is launch the equivalent of a the spell checker--which, I don't believe, I can manipulate/capture.
So, how does the spell checker work? I imagine one could write code to capture a string of consecutive characters (i.e. a space before and after) and check that string against some sort of MS Office dictionary.
Any ideas how to do that?
Comment