Glowman
asked on
Spell Checking
Hi there,
I am trying to create an app that utilizes Word's spell check functionality, but I am having a hard time figuring out what to do when the CheckSpelling() method comes back with a false value. I will award the points to anyone who can show me an example. BTW I base my assumptions on using the Word Object and I instatiate it like so:
Public WordTool As New Word.Document
with a reference in the project to "Microsoft Word 8.0 Object libraray"
Thanks in advance
G
I am trying to create an app that utilizes Word's spell check functionality, but I am having a hard time figuring out what to do when the CheckSpelling() method comes back with a false value. I will award the points to anyone who can show me an example. BTW I base my assumptions on using the Word Object and I instatiate it like so:
Public WordTool As New Word.Document
with a reference in the project to "Microsoft Word 8.0 Object libraray"
Thanks in advance
G
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I'm not positive, but I think the first item in the list after a call to GetSpellingSuggestions is the best suggestion and it goes downhill from there. That seems to be the way Word produces them.
ASKER
ok, fair enough,
Thanks for the prompt response.
Thanks for the prompt response.
You could test for the first item that meets the SpellingErrorType condition if you are concerned that you might receive Capitalization errors before "Not in Dictionary" errors like:
If suggs.SpellingErrorType = wdSpellingNotInDictionary Then
StatusBar = "Unknown word"
End If
If suggs.SpellingErrorType = wdSpellingNotInDictionary Then
StatusBar = "Unknown word"
End If
ASKER
Just one more thing and you can have the points.
How can I get it to give me only the top option and not a list of all choices?
G