我有一个简单的测试 .pptm 文件来尝试在 Windows 7 x64 上调试 PowerPoint 2013 (15.0.4659.1001) 中 AfterShapeSizeChange 事件的失败。
在标准模块中:
Public EH As New ClassEH
' Run to initialise PowerPoint application events
Sub InitApp()
Set EH.App = PowerPoint.Application
End Sub
在名为 ClassEH 的类模块中:
Public WithEvents App As PowerPoint.Application
Private Sub App_WindowSelectionChange(ByVal Sel As Selection)
Debug.Print "App_WindowSelectionChange"
End Sub
Private Sub App_AfterShapeSizeChange(ByVal shp As Shape)
Debug.Print "App_AfterShapeSizeChange"
End Sub
运行 InitApp 后,WindowSelectionChange 事件按预期触发选择更改,但 AfterShapeSizeChange 事件在更改幻灯片上的形状大小后未触发。
根据此 MSDN 文章,此事件已添加到 PowerPoint 2013 中:
http://msdn.microsoft.com/en-us/library/office/jj227375(v=office.15).aspx
有任何想法吗?