powerpoint插件如何获得自己的名字? [英] how can powerpoint addin get itself name?
问题描述
我有一个名为abcde.ppam"的 PowerPoint 插件文件.而且我还添加了一个Auto_Open"子以便在 PowerPoint 应用程序启动时运行一些代码.我的问题是如何在Auto_Open"中获得名称abcde.ppam"?是否有类似ThisAddin.name"或ThisAddin.path"或任何其他解决方法的内容?
I have a PowerPoint addin file named "abcde.ppam". And I also add a "Auto_Open" Sub in order to run some code on PowerPoint Application startup. My question is how can I get the name "abcde.ppam" in "Auto_Open"? Is the anything like "ThisAddin.name" or "ThisAddin.path" or any other workaround there?
推荐答案
您需要做的就是在加载项的代码中声明一个字符串常量并将其设置为加载项的名称.
All you need to do is declare a string constant in the add-in's code and set it to the name of the add-in.
然后就可以做Application.Addins(MyName).Path等等
Then you can do Application.Addins(MyName).Path and so on
这篇关于powerpoint插件如何获得自己的名字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!