PowerPoint 2007/2010 VBA ppam 加载项在打开时未显示在 VBA 编辑器中 [英] PowerPoint 2007/2010 VBA ppam Add-In does not show up in VBA editor when open

查看:78
本文介绍了PowerPoint 2007/2010 VBA ppam 加载项在打开时未显示在 VBA 编辑器中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个模块中创建了一个 PowerPoint 2007/2010 VBA 加载项 (.ppam) 一些代码.我还添加了一个 XML 功能区(不重要,但它表明该文件实际上已在 PowerPoint 中打开).我可以单击我创建的功能区中的一个按钮,它将执行我的模块中的代码.很酷.

I've created a PowerPoint 2007/2010 VBA Add-In (.ppam) some code in a module. I've also added an XML ribbon (not important, but it shows me that the file is in fact open in PowerPoint). I can click a button in the ribbon I created and it will execute code from my module. cool.

当我打开 VBA 编辑器 (ctrl + F11) 时,加载项没有出现.事实上,如果我没有打开另一个文档,我什至无法打开编辑器.我已经在 PowerPoint 2007 和 2010 中尝试过这个.

When I open the VBA editor (ctrl + F11), the Add-In does not show up. In fact, if I don't have another document open I can't even open the editor. I've tried this in PowerPoint 2007 and 2010.

如何编辑已创建的 PowerPoint 加载项的代码?我在 Excel 中制作了许多 VBA 插件,但 PowerPoint 可能有所不同(我疯了吗)?

How can I edit the code of a PowerPoint Add-In I've already created? I've made many VBA Add-Ins in Excel, but maybe PowerPoint is different (am I crazy)?

推荐答案

您不能直接编辑 .ppam,因为它有点像编译".这样做的方法是在 .pptm 中维护所有代码/自定义(并确保将该 .pptm 保留为 .pptm),并且当您想将其作为加载项进行测试时,请执行另存为.." 到 .ppam 然后加载它.不满意吗?返回到您的 .pptm 并在那里进行更改.

You cannot directly edit a .ppam as it is sort of "compiled". The way to do this is maintain all your code/customizations in a .pptm (and make sure you keep that .pptm as a .pptm) and when you want to test it as an add-in, do a "Save As.." to a .ppam and then load it. Not happy with it? Go back to your .pptm and make the changes there.

顺便说一句,如果您不想使用 Ribbon 来确保它已作为加载项加载,只需使用 AutoOpen 宏(在任何模块中),例如:

BTW, if you don't want to use the Ribbon just to ensure it has loaded as an add-in, just use an AutoOpen macro (in any module), like:

Sub Auto_Open()
    MsgBox "My add-in has loaded"
End Sub

一旦您对加载项感到满意,您可以稍后删除该 AutoOpen 宏.

You can remove that AutoOpen macro later, once you're satisfied with your add-in.

这篇关于PowerPoint 2007/2010 VBA ppam 加载项在打开时未显示在 VBA 编辑器中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆