FeatureInstall 属性

       

返回或设置 Microsoft PowerPoint 中对调用的处理方法,该调用的对象是所需功能尚未安装的方法和属性。可读写。MsoFeatureInstall 类型。

expression.FeatureInstall

expression  必选。该表达式返回“应用于”列表中的对象之一。

说明

可以使用 msoFeatureInstallOnDemandWithUI 常数防止用户误以为当安装某功能时系统没有反应。使用带有错误捕获例程的 msoFeatureInstallNone 常数可防止安装最终用户功能。

注意  如果在一字符串中要引用一个已卸载的演示文稿设计模板,则会产生一个运行错误。模板不会不顾 FeatureInstall 属性的设置而自动安装。为当前未安装的模板若要使用 ApplyTemplate 方法,必须首先安装附加的设计模板。方法是:通过运行 Microsoft Office 安装程序(使用 Windows 控制面板中的“添加/删除程序”图标)为 PowerPoint 安装附加设计模板。

示例

本示例检查 FeatureInstall 属性的值。如果该属性设置为 msoFeatureInstallNone,则代码显示一个消息框,以询问用户是否要更改属性设置。如果用户回答“是”,则此属性将会设置为 msoFeatureInstallOnDemand

With Application
    If .FeatureInstall = msoFeatureInstallNone Then
        Reply = MsgBox("Uninstalled features for this " _
                & "application " & vbCrLf _
                & "may cause a run-time error when called." & vbCrLf _
                & vbCrLf _
                & "Would you like to change this setting" & vbCrLf _
                & "to automatically install missing features when called?" _
                , 52, "Feature Install Setting")
            If Reply = 6 Then
                .FeatureInstall = msoFeatureInstallOnDemand
            End If
    End If
End With