Spell checking

Spell checking

I have a bunch of words in a listbox that I want to spell check(with Microsoft Word 2000 maybe?). I would like the routine to delete any word in the listbox that is incorrectly spelled. I don’t want the user to have to ‘OK’ each and every word; I’d like it to be totally automated.

There are a number of well-known articles available at this and other sites about how to connect to Word to do the spell checking. To remove text from a box, you need to use the Clipboard functionality built into your TextBox control. The SelStart, SelLength and SelText properties are typically used with Cut/Copy/Paste operations. If you wanted to remove text that was highlighted, the easy thing to do is this:

TextBox.SelText = ""

This will remove the selected text. In a cut/copy/paste operation, you would move the text to the Windows Clipboard. In this case, you don’t want to save it, so you can just chuck it out the window.


Share the Post: