BrowserLevel 属性(Word) DefaultWebOptionsDefaultWebOptions.BrowserLevel property (Word)

返回或设置一个WdBrowserLevel常量,该常量代表要针对在 Microsoft Word 中创建的新网页的 web 浏览器的级别。Returns or sets a WdBrowserLevel constant that represents the level of the web browser for which you want to target new Web pages created in Microsoft Word. 读/写。Read/write.

语法Syntax

expression.expression. BrowserLevel

_表达式_是必需的。expression Required. 一个代表 DefaultWebOptions 集合的变量。A variable that represents a DefaultWebOptions collection.

备注Remarks

DefaultWebOptions 对象上设置 BrowserLevel 属性后,在 Word 中创建的任何新的 Web 页的 BrowserLevel 属性将相同的全局设置。After you set the BrowserLevel property on the DefaultWebOptions object, the BrowserLevel property of any new Web pages you create in Word will be the same as the global setting.

示例Example

本示例设置 Word 为 Microsoft Internet Explorer 5 优化新网页,并根据此设置创建网页。This example sets Word to optimize new Web pages for Microsoft Internet Explorer 5 and creates a webpage based on this setting.

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

另请参阅See also

DefaultWebOptions 对象DefaultWebOptions Object

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.