Check number of spelling errors in text

Hi,

I want to apply some validation on a text entry to prevent meaningless entry. In my application there are some mandatory fields, but people are typing meaningless data to bypass it. So I was thinking of counting words and if less then X words display an error. I would also want to spell check the text and if the error count is too high, i would also display an error.
I know how to integrate Ms Word spell checking in my program, but I don't know how to count spell errors.
I know this would not be perfect, but it better than nothing.

Anyone have ideas?
hqdevAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DEEPESHCommented:
hqdevAuthor Commented:
Thanks for the link but,
has I said, I already know how to spell check a text box, what I can't find is a way to COUNT spell check errors.
This article show how to spell check a text as I already  have in my program.
DEEPESHCommented:
Dim WordApp As New Word.Application

Dim rngRange As Word.Range
WordApp.Documents.Add()
rngRange = WordApp.ActiveDocument.Range
        rngRange.InsertAfter(TextBox1.Text)
        Dim SpellCollection As Word.ProofreadingErrors
        SpellCollection = rngRange.SpellingErrors
        If SpellCollection.Count > 0 Then
            ListBox1.Items.Clear()
           
            Dim iword As Integer
            Dim newWord As String
            For iword = 1 To SpellCollection.Count
                If SpellCollection.Item(iword).Text <> TextBox2.Text Then
                    newWord = SpellCollection.Item(iword).Text
                    If ListBox1.FindStringExact(newWord) < 0 Then
                        ListBox1.Items.Add(newWord)
                    End If
                End If
            Next
        End If
        Me.Text = "Word Spelling-Checker"

Place TextBox and Listbox on form, its better then previous solution

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
hqdevAuthor Commented:
Great! That works like a charm.
Another thing, my application works in french and english, do you happen to know how to specify the language of the spell checker?

Thanks a lot.
hqdevAuthor Commented:
I found how to specify the language:

rngRange.LanguageID = Word.WdLanguageID.wdFrenchCanadian

Cheers.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.