Spell Check Program In Vb

Posted on by

Can anyone suggest howto do a spell check of a text box in VB6? I think spell check in VB is. My program uses to change language from english to. VB.NET questions; SQL questions. A free Spell Checker with a dictionary editor program. The final stage is to display the Spell Check dialog box.

Spell Check Program In Vb

If you want to write something that doesn't rely on your users having word installed, you can download a list of freeware list of words from. Once you have these, it shouldn't be difficult to write a spell checker - load these words once into a hash table, and go through each word in your text box to see if it's included in the hash table. If you use a hash table, the time to spell-check a document should be proportional to the number of words in the document, and should not depend on the size of the dictionary. Electronics Workbench Multisim 9 Serial on this page. Regards Richard. Private Sub Command1_Click() MsgBox WordSpell(Text1. Xperia Companion. Text) End Sub Function WordSpell(strText As String) Dim status As Boolean Dim objWord As Word.Application Dim objDoc As Word.Document ' '--------------------------------------------- ' Spell check the text. '--------------------------------------------- status = False On Error GoTo ErrorHandler ' ' Start and hide Word.

' Set objWord = CreateObject('word.application') objWord.Visible = False objWord.WindowState = wdWindowStateMinimize ' ' Create a new Word document. ' Set objDoc = objWord.Documents.Add objWord.ActiveDocument.Styles('Normal').LanguageID = 1033 objWord.Selection.HomeKey Unit:=wdLine, Extend:=wdExtend objWord.Selection.WholeStory objWord.Selection.LanguageID = 1033 objWord.Selection.NoProofing = False objWord.Application.CheckLanguage = False objDoc.Range.Delete objDoc.Range = strText status = (objDoc.SpellingErrors.Count = 0) GoTo NormalExit ErrorHandler: MsgBox 'The following error occured during the document's spelling' & vbCrLf & Err.Description NormalExit: ' ' Close word and clean up. ' objDoc.Close savechanges:=wdDoNotSaveChanges objWord.Quit savechanges:=wdDoNotSaveChanges Set objWord = Nothing Set objDoc = Nothing WordSpell = status End Function note: the language is set to 1033 = American English.