AutoLoad 属性

       

决定指定的加载宏在每次启动 PowerPoint 时是否自动加载。可读写。MsoTriState 类型。

说明

设置该属性为 msoTrue 的同时会自动设置 Registered 属性为 msoTrue

示例

本示例显示每次启动 PowerPoint 时自动加载的每个加载项的名称。

For Each myAddIn In AddIns
    If myAddIn.AutoLoad Then
        MsgBox myAddIn.Name
        afound = True
    End If
Next myAddIn
If afound <> True Then 
    MsgBox "No add-ins were loaded automatically."
End If

本示例指定名为“MyTools”的加载项在每次启动 PowerPoint 时自动加载。

Application.AddIns("mytools").AutoLoad = msoTrue