|
-
Apr 17th, 2000, 02:46 AM
#1
Thread Starter
New Member
Hello,
I would like to incorporate a spell checker? If I reference Microsoft Word 8.0 Object Library and distribute the compliled program to others do they need Microsoft Word?
Are there any in-process spell checkers? I do not want the user to rely on a particular spell checker.
Code:
Dim MSWord As Word.Application
Private Sub Form_Load()
Set MSWord = New Word.Application
End Sub
Private Sub cmdCheck_Click()
Dim text As String
Dim suggestion As Word.SpellingSuggestion
Dim colSuggestions As Word.SpellingSuggestions
If MSWord.Documents.Count = 0 Then MSWord.Documents.Add
text = Trim(txtWord.text)
lstSuggestions.Clear
If MSWord.CheckSpelling(text) Then
lstSuggestions.AddItem "(correct)"
Else
Set colSuggestions = MSWord.GetSpellingSuggestions(text)
If colSuggestions.Count = 0 Then
lstSuggestions.AddItem "(no suggestions)"
Else
For Each suggestion In colSuggestions
lstSuggestions.AddItem suggestion.Name
Next
End If
End If
End Sub
Thanks,
deDogs
-
Apr 17th, 2000, 03:10 AM
#2
Lively Member
If you ref. word, word needs to be installed on the computer. I'm sure there spell checkers out there, don't know of any tho. You could also test the computer at runtime to see if there is word, or another program on it that has a spell checker and use that one, and if not disable the spell checking. It would involve alot more code tho.
-
Apr 17th, 2000, 03:25 AM
#3
Thread Starter
New Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|