Results 1 to 3 of 3

Thread: Spelling Correct?

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 1999
    Location
    Michigan
    Posts
    15

    Question

    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

  2. #2
    Lively Member
    Join Date
    Mar 2000
    Posts
    82
    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.

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 1999
    Location
    Michigan
    Posts
    15

    thanks

    thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width