PowerPoint 2007:GetPressedMso没有反映ExecuteMso? [英] PowerPoint 2007: GetPressedMso not reflecting ExecuteMso?
问题描述
我正在使用PowerPoint 2007,试图通过VBA按下按钮。考虑以下函数:
Sub ClickButton(str As String)
CommandBars.ExecuteMso str ' execute respective button action
Debug.Print CommandBars.GetPressedMso(str) ' retrieve button state after executing action
End Sub
我期待上述功能执行以下操作:
I expected the above function to do the following:
- 执行相应的按钮操作(如https://msdn.microsoft.com/de-de/library/所示) office / Ff862419.aspx)。
- 打印相应的按钮在ExecuteMso之后按状态。
在PowerPoint 2007中,如果已经选择了按钮ShapeRectangle,则对ClickButton("ObjectsSelect")的调用将打印False,即使我们的ExecuteMso应该已经运行。但是,`ExecuteMso`似乎工作,因为在执行该函数后,在功能区中按下了'ObjectsSelect`
。
In PowerPoint 2007, if the button ShapeRectangle is already selected, a call to ClickButton("ObjectsSelect") prints False, even if we ExecuteMso should have run. Still, `ExecuteMso` seems to work, because after the function is executed, `ObjectsSelect` is pressed in the ribbon.
较新的PowerPoint版本或其他按钮似乎按预期工作。
Newer PowerPoint versions, or other buttons, seem to work as expected.
2007年在ObjectsSelect中记录的行为是什么?或者我刚遇到一个bug?
Is the behaviour in 2007 with ObjectsSelect documented somewhere? Or did I just encounter a bug?
推荐答案
您好phmtc,
Hi phmtc,
ShapeRectangle按钮的含义是什么?我无法从PowerPoint 2007中找到它,您是否应该分享我们如何在PowerPoint 2007中选择它?
What does ShapeRectangle button means? I am not able to find it from PowerPoint 2007, would you mindinng sharing how we can select it in PowerPoint 2007?
问候&& Fei
Regards & Fei
这篇关于PowerPoint 2007:GetPressedMso没有反映ExecuteMso?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!