为PowerPoint(Office 365)Mac开发自定义功能区加载项

编程入门 行业动态 更新时间:2024-10-07 22:22:50
本文介绍了为PowerPoint(Office 365)Mac开发自定义功能区加载项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

最近,我从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开发自定义功能区加载项

本文发布于:2023-10-31 10:23:50,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1545801.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:自定义   加载   功能   Office   PowerPoint

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!