2012-10-19 59 views

回答

0

您可以创建自己的按钮,以使用以下用于VSTO的VB.NET代码执行此操作。

Public Sub SpellCheckButton(ByVal Control As Office.IRibbonControl) 
     Try 
      Dim result As String = "Spelled incorrectly." 

      If Me.Application.CheckSpelling(Me.Range.Text) = True Then 
       result = "Spelled correctly." 
      End If 
      MessageBox.Show(result) 

     Catch ex As Exception 
      MessageBox.Show(ex.ToString()) 

     End Try 

    End Sub