Class WebOptions (Word VBA)

Contains document-level attributes used by Microsoft Word when you save a document as a webpage or open a webpage.

Class Document gives access to class WebOptions.


Dim wos as WebOptions
Set wos = ActiveDocument.WebOptions

Methods

UseDefaultFolderSuffix - Sets the folder suffix for the specified document to the default suffix for the language support you have selected or installed.

Properties

AllowPNG true if PNG (Portable Network Graphics) is allowed as an image format when you save a document as a webpage. False if PNG is not allowed as an output format. The default value is False.

BrowserLevel returns or sets WdBrowserLevel that represents the level of web browser at which you want to target the specified Web page.

Encoding 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 returns the folder suffix that Microsoft Word uses when you save a document as a webpage, 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 true if Word optimizes the specified Web page for the web browser specified by the BrowserLevel property.

OrganizeInFolder 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 webpage. False if supporting files are saved in the same folder as the webpage. The default value is True.

PixelsPerInch returns or sets the density (pixels per inch) of graphics images and table cells on a webpage.

RelyOnCSS true if cascading style sheets (CSS) are used for font formatting when you view a saved document in a web browser. The default value is True.

RelyOnVML true if image files are not generated from drawing objects when you save a document as a webpage. False if images are generated. The default value is False.

ScreenSize 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 sets or returns an MsoTargetBrowser 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 webpage. False if long file names are not used and the DOS file name format (8.3) is used. The default value is True.