0

是否可以在右键单击操作上实现 OnAction() 处理程序?这是针对以编程方式创建的 DropDown 对象。

4

1 回答 1

1

您可以查看WindowBeforeRightClick

Public WithEvents appWord as Word.Application 

Private Sub appWord_WindowBeforeRightClick _ 
 (ByVal Sel As Selection, Cancel As Boolean) 
 Dim intResponse As Integer 

 intResponse = MsgBox("Selection = " & Sel & vbLf & vbLf _ 
 & "Continue with operation on this selection?", _ 
 vbYesNo) 
 If intResponse = vbNo Then Cancel = True 
End Sub

或者自定义右键菜单

我也没有尝试过。

于 2012-04-04T09:57:04.067 回答