【发布时间】:2012-10-09 20:39:37
【问题描述】:
有没有办法在 Word 2010 中检测事件拼写检查开始和拼写检查完成?
谢谢!
【问题讨论】:
标签: c# vba automation vsto office-interop
有没有办法在 Word 2010 中检测事件拼写检查开始和拼写检查完成?
谢谢!
【问题讨论】:
标签: c# vba automation vsto office-interop
您可以使用以下用于 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
【讨论】: