Table of contents
TOC
折叠目录
展开目录

外接程序对象 (PowerPoint)AddIns Object (PowerPoint)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

无论被加载到 PowerPoint,表示所有 Microsoft PowerPoint 特定加载项可用的外接程序对象的集合。这不包括组件对象模型 (COM) 加载项。A collection of AddIn objects that represent all the Microsoft PowerPoint-specific add-ins available to PowerPoint, regardless of whether or not they are loaded. This does not include Component Object Model (COM) add-ins.

示例Example

使用外接程序方法返回AddIns集合中。下面的示例在 PowerPoint 中显示的所有外接程序当前已加载的名称。Use the AddIns method to return the AddIns collection. The following example displays the names of all the add-ins that are currently loaded in PowerPoint.

For Each ad In AddIns

    If ad.Loaded Then MsgBox ad.Name

Next

使用Add方法 PowerPoint 特定加载项添加到列表中的可用。Add方法向列表中添加外接程序中但不加载外接程序。若要加载外接程序,该外接程序的加载属性设置为True之后使用Add方法。可以在单个步骤中,执行这两个操作,如下面的示例 (请注意Add方法使用加载宏的不是它的标题,名称) 中所示。Use the Add method to add a PowerPoint-specific add-in to the list of those available. The Add method adds an add-in to the list but does not load the add-in. To load the add-in, set theLoadedproperty of the add-in to True after you use the Add method. You can perform these two actions in a single step, as shown in the following example (note that you use the name of the add-in, not its title, with the Add method).

AddIns.Add("graphdrs.ppa").Loaded = True

使用外接程序(索引) 的索引为外接程序的标题或索引号,返回单个外接程序对象。下面的示例加载的假设加载项标题为"我的 ppt 工具"。Use AddIns (index), where index is the add-in's title or index number, to return a single AddIn object. The following example loads the hypothetical add-in titled "my ppt tools".

AddIns("my ppt tools").Loaded = True

不要混淆加载项标题与加载项名称,该名称是加载宏的文件名。必须严格按照其拼写加载项选项卡中,但大小写不必匹配拼写加载项标题。Do not confuse the add-in title with the add-in name, which is the file name of the add-in. You must spell the add-in title exactly as it is spelled in the Add-Ins tab, but the capitalization does not have to match.

另请参阅See also

概念Concepts

PowerPoint 对象模型引用PowerPoint Object Model Reference

© 2018 Microsoft