CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2000
    Posts
    3

    Algorithm for making spelling suggestions

    Hi all,

    I welcome opinioms on writing a spell checker & Thesaurus with VB.



    Mass

  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: Algorithm for making spelling suggestions

    Why to write your own spell checker when you can call one from word.
    Here the example how to use it

    'works only with RTF text box (don't forget to reference MSWord 8.0)
    On Error GoTo SpellCheckErr
    Dim oWord As Object

    Set oWord = CreateObject("Word.Application")

    'Save the RTF Box contents to a temporary file
    rtfText.SaveFile "C:\temp\TEST.RTF", rtfRTF

    'Open the saved document and spellcheck it
    oWord.Documents.Open ("C:\temp\TEST.RTF")
    oWord.ActiveDocument.SpellingChecked = False
    oWord.Options.IgnoreUppercase = False
    oWord.ActiveDocument.CheckSpelling

    'Save the changes to the RTF file & close
    oWord.ActiveDocument.Save
    oWord.ActiveDocument.Close
    oWord.Quit

    'Load the changes back to the rtf text box.
    rtfText.LoadFile "C:\temp\TEST.RTF", rtfRTF

    Set oWord = Nothing
    Screen.MousePointer = vbDefault
    MsgBox "Spell Check is complete", _
    vbInformation, "Spell Check"
    'delete the temp file
    Kill "c:\temp\test.rtf"
    Exit Sub

    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

  3. #3
    Join Date
    Aug 2000
    Posts
    3

    Re: Algorithm for making spelling suggestions

    Dear friend,

    Thanks, but I wanted to know how it is done. If you use Word, the user needs to have a ver of Word installed.Incase the user dosn't have MSWORD, could you please tell me the name of dlls or whatever is needed to be sand whith my application

    Regards,

    Mass

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

Featured