devxlogo

Spell checking

Spell checking

Question:
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.

Answer:
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.

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist