【发布时间】:2018-03-11 13:43:01
【问题描述】:
我有一个简单的测试 .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
有什么想法吗?
【问题讨论】:
标签: vba powerpoint powerpoint-2013