Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual Basic
Expertise: Beginner
Sep 11, 2000

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.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date