WebOptions 接口

定义

包含在将文档另存为网页或打开网页时 Microsoft Word 所使用的文档级属性。Contains document-level attributes used by Microsoft Word when you save a document as a Web page or open a Web page.

public interface class WebOptions
[System.Runtime.InteropServices.Guid("000209E4-0000-0000-C000-000000000046")]
public interface WebOptions
type WebOptions = interface
Public Interface WebOptions
属性

注解

您可以在应用程序(全局)级返回或设置属性,也可以在文档级返回或设置。You can return or set attributes either at the application (global) level or at the document level. (请注意,每个文档的属性值可能不同,具体取决于保存文档时的属性值。)文档级属性设置将覆盖应用程序级别的属性设置。(Note that attribute values can be different from one document to another, depending on the attribute value at the time the document was saved.) Document-level attribute settings override application-level attribute settings. 应用程序级属性包含在对象中 DefaultWebOptionsApplication-level attributes are contained in the DefaultWebOptions object.

使用 WebOptions 属性返回WebOptions对象。Use the WebOptions property to return the WebOptions object.

属性

AllowPNG

如此 如果在将文档保存为 Web 页时,允许将 PNG (可移植网络图形) 作为图像格式。True if PNG (Portable Network Graphics) is allowed as an image format when you save a document as a Web page. 如果不允许将 PNG 作为输出格式。False if PNG is not allowed as an output format. 默认值为 FalseThe default value is False.

Application

返回一个 Application 代表 Microsoft Word 应用程序的对象。Returns a Application object that represents the Microsoft Word application.

BrowserLevel

返回或设置一个常量,表示要在其上定位指定网页的 Web 浏览器的级别。Returns or sets a constant that represents the level of Web browser at which you want to target the specified Web page.

Creator

返回一个 32 位整数,它指示在其中创建指定的对象的应用程序。Returns a 32-bit integer that indicates the application in which the specified object was created.

Encoding

返回或设置文档编码 (代码页或字符集) 若要查看保存的文档时 Web 浏览器使用。Returns or sets the document encoding (code page or character set) to be used by the Web browser when you view the saved document.

FolderSuffix

返回 Microsoft Word 在将文档保存为网页时使用的文件夹后缀,使用长文件名,并选择将支持文件保存在单独的文件夹中(即,如果 UseLongFileNamesOrganizeInFolder 属性设置为True)。Returns the folder suffix that Microsoft Word uses when you save a document as a Web page, use long file names, and choose to save supporting files in a separate folder (that is, if the UseLongFileNames and OrganizeInFolder properties are set to True).

OptimizeForBrowser

如此如果 Microsoft word 优化在 Word 中为该属性指定的 web 浏览器创建的新网页 BrowserLevel (针对该 DefaultWebOptions 对象)。True if Microsoft Word optimizes new Web pages created in Word for the Web browser specified by the BrowserLevel property (for the DefaultWebOptions object). 如此如果 Word 为由属性指定的 web 浏览器优化指定的网页 BrowserLevel (针对该 WebOptions 对象)。True if Word optimizes the specified Web page for the Web browser specified by the BrowserLevel property (for the WebOptions object).

OrganizeInFolder

如此 如果在将指定的文档保存为 Web 页时所有的支持文件,例如,背景纹理和图形,都组织在单独的文件夹。True if all supporting files, such as background textures and graphics, are organized in a separate folder when you save the specified document as a Web page. 如果支持文件保存在与网页相同的文件夹中。False if supporting files are saved in the same folder as the Web page. 默认值为 TrueThe default value is True.

Parent

返回一个对象,代表指定对象的父对象。Returns an object that represents the parent object of the specified object.

PixelsPerInch

返回或设置在 Web 页上图形图像和表格单元格的密度 (每英寸像素数)。Returns or sets the density (pixels per inch) of graphics images and table cells on a Web page.

RelyOnCSS

如此 如果您在 Web 浏览器中查看保存的文档时,字体格式使用级联样式表 (CSS)。True if cascading style sheets (CSS) are used for font formatting when you view a saved document in a Web browser.

RelyOnVML

如此 如果不从将文档保存为 Web 页时,图形对象中生成图像文件。True if image files are not generated from drawing objects when you save a document as a Web page. 如果生成图像。False if images are generated. 默认值为 FalseThe default value is False.

ScreenSize

返回或设置在 Web 浏览器中查看保存的文档时应使用的理想最小屏幕大小 (宽度乘高度,以像素为单位)。Returns or sets the ideal minimum screen size (width by height, in pixels) that you should use when viewing the saved document in a Web browser.

TargetBrowser

设置或返回一个常量,该常量代表在 Web 浏览器中查看的文档的目标浏览器。Sets or returns a constant representing the target browser for documents viewed in a Web browser.

UseLongFileNames

如此 如果您将文档保存为网页时使用长文件名。True if long file names are used when you save the document as a Web page. 如果不使用长文件名和 DOS 文件名格式 (8.3) 用。False if long file names are not used and the DOS file name format (8.3) is used. 默认值为 TrueThe default value is True.

方法

UseDefaultFolderSuffix()

根据选定或安装的语言,将含指定文档的文件夹后缀设置为默认后缀。Sets the folder suffix for the specified document to the default suffix for the language support you have selected or installed.

适用于