Is it possible to use the grammer correction feature in Word?
I have a huge word list in text that I needs to have each word flaged with a 1 or 0 to specify that the word can\cannot be used after "a", "an", or "the" in a sentance. One way I thought of doing this is by pasting text from the file to Word, and then using it as a 'grammer checker' Is this even possible? Does anyone have any suggestions on how to go about this?
Thanx...
Aries
Re: Is it possible to use the grammer correction feature in Word?
Oh I thought it would never be asked! :D Look at my signature, I have two complete examples (one VB6 and one VB.NET) of using the Word spell checker in an app. You can check or uncheck the grammer etc. all from VB. :D
Re: Is it possible to use the grammer correction feature in Word?
Thanks that really helps!
Re: Is it possible to use the grammer correction feature in Word?
Now is it possible to use the results in VB?
IE.
If not grammaticallyCorrect then
doSomething.Doit
End if
I hope its not too confusing but I need to know wheather or not the text was grammatically inncorrect.
Re: Is it possible to use the grammer correction feature in Word?
My code examples are in vb and not Word. :) You can pass a textbox text and have it check for spelling and/or grammer errors and correct them.
VB Code:
If Text1.Text <> SpellMe(Text1.Text) Then
But you didnt state which VB version your needing to use?
You could modify the code or add another function that would only check for either spelling and/or grammer errors.
Re: Is it possible to use the grammer correction feature in Word?
Re: Is it possible to use the grammer correction feature in Word?
In my vb6 code example these lines are where you would want to handle just checking spelling or grammer errors.
VB Code:
oDoc.Words.First.InsertBefore msSpell
iWSE = oDoc.SpellingErrors.Count
iWGE = oDoc.GrammaticalErrors.Count '<--Handle or msgbox grammer errors using this
Re: Is it possible to use the grammer correction feature in Word?
ok Im almost home... is there a way for me to simulate a button press on the dialog box?
I have it able to run through an entire list accept I need to press a button to proceed to the next word in the file. So can you help me think of a way to do this? The dialog box needs to be visible or else the word progam cannot be activated may there is another way?
Thanx for your help...
Re: Is it possible to use the grammer correction feature in Word?
So your saying that the spell checker needs to be completely hidden and auto correct? If this is correct I will see what I can come up with then.
Re: Is it possible to use the grammer correction feature in Word?
What I need is to be able to get the results of the grammer check for a list of words in a text file. Im able to feed the text file to the program and have it check each word in a loop, but every time there is an error I have to manually tell the program to continue by clicking 'change' or 'ignore' etc. I hope this clears thing up a bit and thanx for all of your help!
Re: Is it possible to use the grammer correction feature in Word?
I cant find a way to access the grammer suggestions list as there is no method for them, but there is one for spelling errors. So an autocorrect, behind the scenes, spelling corrector is possible, but not Grammer that I have seen yet. I will continue on a bit more..