|
-
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
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
|