确实如此,你必须装有office97以上
然后,声明一个Document对象,具体有些细节不便一一道明,有以下代码你消化消化
Dim mdocSpell As New Document
Private Sub cmdSpell_Click()
    'Add text to a word range object
    mdocSpell.Range.Text = txtSpell    ‘txtSpell是一个textBox
    
    'IMPORTANT:you must perform the following two steps
              'before using the check spelling method!!
    'be sure that word is visible
    mdocSpell.Application.Visible = True
    'activate word
    AppActivate mdocSpell.Application.Caption
    
    'check spelling
    mdocSpell.Range.CheckSpelling
    
    'update text box with changes from word
    txtSpell = mdocSpell.Range.Text
    
    'Trim off null character that word adds
    txtSpell = Left(txtSpell, Len(txtSpell) - 1)
    
    'activate this application
    AppActivate Caption
End Sub

解决方案 »

  1.   

    pan33所说的是word的VBA调用,若是VB,需要使用OLE创建WORD对象,然后在利用该对象调用拼写检查。
      

  2.   

    记着添加对Microsoft Word 9.0(or 8.0) Object Library 的引用。
    其他的同my8848
      

  3.   

    Alpha已说添加对Microsoft Word 9.0(or 8.0) Object Library 的引用。
    然后
    Private Sub cmdSpell_Click()
      Dim X As Object                    'create Word object variable
      Set X = CreateObject("Word.Application")
      X.Visible = True                  'hide Word
      X.Documents.Add                    'open a new document
      X.Selection.Text = Text1.Text      'copy text box to document
      X.ActiveDocument.CheckSpelling     'run spell check
      Text1.Text = X.Selection.Text      'copy results back
      X.ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges
      X.Quit                             'quit Word
      Set X = Nothing                    'release object variable
    End Sub
      

  4.   

    用StrConv就可以,方法在MSDN中找到,一句话就ok