[RESOLVED] Check spelling of textbox
G’day everyone. I’m looking for a nice, neat simple solution for running a spell check on the contents of some text boxes in a form. The form, which is attached to a Word 2003 template, spits information into a Word document. I would like to use Word’s spelling checker (so that the user gets suggestions for incorrectly spelled words) and I would like to link it to the form so that the user sees the text box with the problem spelling as they are going through the spell check. (I don’t want to check the entire document as it also contains text that has words and abbreviations that are not in use in the standard dictionary Word provides.)
I’ve searched for possible solutions. Most of these are written for Excel and involve opening and then closing an instance of Word, which, since I’m working in Word, wouldn’t work. I’ve seen one solution for Access but the command it uses isn’t available in Word.
Re: Check spelling of textbox
The Word spell checker checks a document, I doubt you can use it to work on a form. What is this access command. If you found a way to do what you want in Access that that is probably your best place to start.
Or you can make a new word document, copy from your form what you want to check, run the spell checker and copy the results back to your form.
Unless anyone else has any better ideas.
Re: Check spelling of textbox
Working from Access isn't an option, as this project is for work and not all of us have access to Access. I am beginning to suspect that creating a second document may be the only option, although it is not as elegant a solution as I would like.
Re: Check spelling of textbox
Unfortunately when you use someone else's tool in a way it wasn't intended, chances are you have to make sacrifices. All you need is a dictionary and you can easily make your own spell checker. But the logic for recommendations isn't easy.
I believe you can put textboxes in a document. Don't know if the spell checker checks those. And if you really want a form then it doesn't matter.
Re: Check spelling of textbox
Hi Resource Dragon,
Take a look at the ideas and code at this link.
http://gregmaxey.mvps.org/Spell%20Ch...%20Entries.htm
Re: Check spelling of textbox
Nice find man!! Just what the Dragon ordered!
Re: Check spelling of textbox
Quote:
I’ve searched for possible solutions. Most of these are written for Excel and involve opening and then closing an instance of Word, which, since I’m working in Word, wouldn’t work.
It will :)
Simply create a new word document and set it's(document's and not application's) visible property to 'false'
I believe Marty has posted something how to use that facility in one of the threads in codebank... Let me look it for you...
Edit: Got it....
By Marty
http://www.vbforums.com/showthread.php?t=246451
And see the below by Rob (Nice One!)
http://www.vbforums.com/showthread.php?t=350402
Re: Check spelling of textbox
I've had a look at Greg Maxey's solution that SQALDOman pointed out. It looks like it should do the trick. Thanks, gang!
cheers
The Dragon