Share via


DocumentBase.WebOptions Property

Gets the WebOptions object, which contains document-level attributes used by Microsoft Office Word when you save a document as a Web page or open a Web page.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)

Syntax

'Declaration
Public ReadOnly Property WebOptions As WebOptions
    Get
public WebOptions WebOptions { get; }

Property Value

Type: Microsoft.Office.Interop.Word.WebOptions
The WebOptions object, which contains document-level attributes used by Microsoft Office Word when you save a document as a Web page or open a Web page.

Examples

The following code example specifies that cascading style sheets and Western document encoding be used when items in the active document are saved to a Web page. To use this example, run it from the ThisDocument class in a document-level project.

Private Sub DocumentWebOptions()
    Me.WebOptions.RelyOnCSS = True
    Me.WebOptions.Encoding = Office.MsoEncoding.msoEncodingWestern
End Sub 
private void DocumentWebOptions()
{
    this.WebOptions.RelyOnCSS = true;
    this.WebOptions.Encoding = Office.MsoEncoding.msoEncodingWestern;
}

.NET Framework Security

See Also

Reference

DocumentBase Class

Microsoft.Office.Tools.Word Namespace