最近,我从Windows工作笔记本电脑切换到Mac,并在其中安装了一些我想通过PowerPoint加载项安装的不错的功能.
I have recently switched to Mac from my Windows work laptop where I had some nice features installed via PowerPoint add-ins that I would like to replicate.
我所有的宏都在工作,现在我试图将它们变成可以在我的计算机上加载的工作加载项.
I have all my macros working, and I am now trying to turn them into a working add-in that I can load on my machine.
现在,在开始介绍加载项和bla bla bla的棘手部分之前.我真的很简单(带有自定义工具栏的pptm文件).我遵循了 ron de bruin的惊人指南.但是,当我在Mac上启动演示文稿时(在Windows上它们可以工作),按钮不会触发宏(无论是哪个宏).
Now, before we get to the tricky part of signing the add-in and bla bla bla.. I am starting really simple (pptm file with custom toolbar). I have followed ron de bruin's amazing guide. However, when I launch my presentation on Mac (on Windows they work), the buttons don't trigger the macro (no matter what macro).
这是customUI.xml文件的内容
Here is the customUI.xml files content
<customUI xmlns="schemas.microsoft/office/2006/01/customui"> <ribbon> <tabs> <tab id="MyCustomTab" label="My Tab" insertAfterMso="TabHome"> <group id="customGroup1" label="Group 1"> <button id="customButton1" label="Caption 1" size="normal" onAction="Macro1" imageMso="Cut" /> <button id="customButton2" label="Caption 2" size="normal" onAction="Macro2" imageMso="Bold" /> <button id="customButton3" label="Caption 3" size="normal" onAction="Macro3" imageMso="Italic" /> </group> </tab> </tabs> </ribbon> </customUI>这是我在VBA中宏模块的内容:
And here is the content of my macro's module in VBA:
Option Explicit 'Callback for customButton1 onAction Sub Macro1(control As IRibbonControl) MsgBox "This is macro 1" End Sub 'Callback for customButton2 onAction Sub Macro2(control As IRibbonControl) MsgBox "This is macro 2" End Sub 'Callback for customButton3 onAction Sub Macro3(control As IRibbonControl) MsgBox "This is macro 3" End Sub知道我在做什么错吗?
推荐答案我已经可以通过在安全和隐私"中设置以下首选项来(临时)解决该问题:*宏安全性>全部启用*信任对VBA项目对象模型的访问*允许操作在不通知的情况下运行程序哈珀这有帮助
I have made it possible to (temporarily) solve the issue by setting the following preferences in "Security and Privacy": * Macro Security > Enable All * Trust access to the VBA project object model * Allow actions to run programs without notification Hoper this helps
更多推荐
为PowerPoint(Office 365)Mac开发自定义功能区加载项
发布评论