全部显示

TargetBrowser 属性

       

设置或返回 MsoTargetBrowser 类型常数,该常数代表用于 Microsoft PowerPoint 的浏览器。可读写。

expression.TargetBrowser

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

示例

本示例中,如果当前目标浏览器的版本较早,则将当前演示文稿的目标浏览器设置为 Microsoft Internet Explorer 6。

Sub SetWebBrowser()
    With ActivePresentation.WebOptions
        If .TargetBrowser < msoTargetBrowserIE6 Then
            .TargetBrowser = msoTargetBrowserIE6
        End If
    End With
End Sub

本示例将所有演示文稿的目标浏览器设置为 Internet Explorer 6。

Sub GlobalTargetBrowser()
    Application.DefaultWebOptions _
        .TargetBrowser = msoTargetBrowserIE6
End Sub