none
Word 2016 不会响应WindowBeforeRightClick事件的Bug问题,要如何解决 RRS feed

  • 问题

  • Word 2016 不会响应WindowBeforeRightClick事件,测试的代码如下:  

    Public WithEvents appWord As Word.Application

    Private Sub appWord_WindowBeforeDoubleClick(ByVal Sel As Selection, Cancel As Boolean)
     Dim intResponse As Integer
     intResponse = MsgBox("DoubleClick= " & Sel & vbLf & vbLf _
     & "Continue with operation on this selection?", _
     vbYesNo)
     If intResponse = vbNo Then Cancel = True
    End Sub

    Private Sub appWord_WindowBeforeRightClick(ByVal Sel As Selection, Cancel As Boolean)
     Dim intResponse As Integer
     intResponse = MsgBox("RightClick = " & Sel & vbLf & vbLf _
     & "Continue with operation on this selection?", _
     vbYesNo)
     If intResponse = vbNo Then Cancel = True
    End Sub

    在Word 2016中上面的WindowBeforeDoubleClick事件可以在双击Word文档内容的时候响应,但WindowBeforeRightClick事件在右键点击Word文档内容时不会响应,而在Word2003/2007/2010/2013中WindowBeforeRightClick事件是可以被响应的。

    请教一下大家,要如何解决这个问题?

    2015年11月12日 11:14