Share via


DocumentBase.WebOptions Property

Definition

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.

public:
 property Microsoft::Office::Interop::Word::WebOptions ^ WebOptions { Microsoft::Office::Interop::Word::WebOptions ^ get(); };
public Microsoft.Office.Interop.Word.WebOptions WebOptions { get; }
member this.WebOptions : Microsoft.Office.Interop.Word.WebOptions
Public ReadOnly Property WebOptions As WebOptions

Property Value

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 void DocumentWebOptions()
{
    this.WebOptions.RelyOnCSS = true;
    this.WebOptions.Encoding = Office.MsoEncoding.msoEncodingWestern;
}
Private Sub DocumentWebOptions()
    Me.WebOptions.RelyOnCSS = True
    Me.WebOptions.Encoding = Office.MsoEncoding.msoEncodingWestern
End Sub 

Applies to