【问题标题】:VSTO C#/VBA Word Spell Check EventsVSTO C#/VBA 单词拼写检查事件
【发布时间】:2012-10-09 20:39:37
【问题描述】:

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

谢谢!

【问题讨论】:

    标签: c# vba automation vsto office-interop


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 2011-05-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-06-24
      • 1970-01-01
      • 1970-01-01
      • 2017-06-22
      • 2018-03-22
      相关资源
      最近更新 更多