Hurricane766
IS-IT--Management
Hi,
I'm trying to use MS Word's spellchecker to spell check some text written in my program.
That's nice and all, but I want the spell checking and correcting to happen in my program, not in word. In fact I want word to be invisible so the user thinks they're just using my program. I plan on writing my own spellchecking window but I need the following things:
1. A way to know if there was a spelling error.
2. A way to get the spelling suggestions for that error.
I've tried some things but these either don't work or I can't get the info from the ole functions.
Niether of these seems to work: I'm not sure if they will or not, or if I just don't know the type of variable to use to get the info.
Any suggestions?
Thanks
I'm trying to use MS Word's spellchecker to spell check some text written in my program.
Code:
OLEObject myoleobject
myoleobject = CREATE
OLEObjectmyoleobject.application.Documents.Add()
myoleobject.application.Selection.Range.Text = st_curword
myoleobject.application.Selection.Range.CheckSpelling()
//at this point the Word spell checking window pops up with suggestions for mistakes ect.
myoleobject.application.DisplayAlerts = FALSE
myoleobject.application.Quit()
That's nice and all, but I want the spell checking and correcting to happen in my program, not in word. In fact I want word to be invisible so the user thinks they're just using my program. I plan on writing my own spellchecking window but I need the following things:
1. A way to know if there was a spelling error.
2. A way to get the spelling suggestions for that error.
I've tried some things but these either don't work or I can't get the info from the ole functions.
Code:
myoleobject.application.Selection.Range.SpellingErrors
//is supposed to return the spelling errors
myoleobject.application.Selection.Range.GetSpellingSuggestions(st_curword)
//is supposed to get the spelling suggestions for the st_curword
Niether of these seems to work: I'm not sure if they will or not, or if I just don't know the type of variable to use to get the info.
Any suggestions?
Thanks