PowerPoint 2007 VBA - 无法使功能区按钮工作
从今天开始,我的 PowerPoint 2007 功能区中的自定义按钮将无法使用。每次单击该按钮时,都会出现以下错误消息:“由于您的安全设置,无法找到该宏或该宏已被禁用。”
我用谷歌搜索了这个问题,但没有找到解决方案。我完全不知所措。
以下是宏的代码:
Sub RunThisCode()<br>
MsgBox "Yes, this works", vbExclamation
End Sub
我尝试过使用或不使用 ByVal 控件作为 IRibbonControl。无论如何都没有运气。
和 XML 代码
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon>
<tabs>
<tab idMso="TabHome">
<group id="CustomGroup" label="MyGroup">
<button id="btnTest" label="TestButton" imageMso="HappyFace" size="large" onAction="RunThisCode" keytip="S" />
</group>
</tab>
</tabs>
</ribbon>
我的安装是通过 Softricity SoftGrid 作为虚拟安装运行的,无论其价值如何。
有什么想法吗?
Starting today, no custom button in my PowerPoint 2007 ribbon will work. Each time I click the button, the following error message appears: "The macro cannot be found or has been disabled because of your security settings."
I've Googled this issue to death and found no solution. I'm at a complete loss.
Here is the code for the macro:
Sub RunThisCode()<br>
MsgBox "Yes, this works", vbExclamation
End Sub
I've tried both with and without the ByVal control as IRibbonControl. No luck either way.
And the XML code
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon>
<tabs>
<tab idMso="TabHome">
<group id="CustomGroup" label="MyGroup">
<button id="btnTest" label="TestButton" imageMso="HappyFace" size="large" onAction="RunThisCode" keytip="S" />
</group>
</tab>
</tabs>
</ribbon>
My installation is running through Softricity SoftGrid as a virtual installation, for what it's worth.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
结果我的代码中有一个编译错误,奇怪的是,2007 年没有出现,但 2010 年却出现了。尽管如此,我仍然很困惑为什么上面发布的基本宏不起作用。
Turns out there was a compiling error in my code that, oddly, 2007 didn't pick up, but 2010 did. Though, I am still confused why even the basic macro posted above wasn't working.