OptimizeForBrowser 属性

       

如果为 True,Microsoft Word 将针对由 BrowserLevel 属性指定的 Web 浏览器来优化在 Word 中创建的新 Web 页(对于 DefaultWebOptions 对象)。如果为 True,Microsoft Word 将针对由 BrowserLevel 属性指定的 Web 浏览器来优化指定的 Web 页(对于 WebOptions 对象)。Boolean 类型,可读写。

expression.OptimizeForBrowser

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

示例

本示例设置 Word 针对 Microsoft Internet Explorer 5 来优化新 Web 页,然后基于本设置创建 Web 页。

With Application.DefaultWebOptions
    .BrowserLevel _
        = wdBrowserLevelMicrosoftInternetExplorer5
    .OptimizeForBrowser = True
End With
Documents.Add DocumentType:=wdNewWebPage

本示例新建一个 Web 页,并为 Microsoft Internet Explorer 5 优化该 Web 页。

Documents.Add DocumentType:=wdNewWebPage
With ActiveDocument.WebOptions
    .BrowserLevel _
        = wdBrowserLevelMicrosoftInternetExplorer5
    .OptimizeForBrowser = True
End With