Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/309.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/vba/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
VSTO C#/VBA单词拼写检查事件_C#_Vba_Automation_Vsto_Office Interop - Fatal编程技术网

VSTO C#/VBA单词拼写检查事件

VSTO C#/VBA单词拼写检查事件,c#,vba,automation,vsto,office-interop,C#,Vba,Automation,Vsto,Office Interop,有没有办法检测Word 2010中拼写检查开始和拼写检查完成的事件 谢谢 您可以使用以下VSTO的VB.NET代码创建自己的按钮 Public Sub SpellCheckButton(ByVal Control As Office.IRibbonControl) Try Dim result As String = "Spelled incorrectly." If Me.Application.CheckSpellin

有没有办法检测Word 2010中拼写检查开始和拼写检查完成的事件


谢谢

您可以使用以下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