Document.WebOptions Property (2007 System)

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.v9.0 (in Microsoft.Office.Tools.Word.v9.0.dll)

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public ReadOnly Property WebOptions As WebOptions
'Usage
Dim instance As Document 
Dim value As WebOptions 

value = instance.WebOptions
[BrowsableAttribute(false)]
public WebOptions WebOptions { get; }
[BrowsableAttribute(false)]
public:
property WebOptions^ WebOptions {
    WebOptions^ get ();
}
public function get WebOptions () : WebOptions

Property Value

Type: 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.

This example is for a document-level customization.

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

Document Class

Document Members

Microsoft.Office.Tools.Word Namespace