Workbook.WebOptions Property (2007 System)

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

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public ReadOnly Property WebOptions As WebOptions
'Usage
Dim instance As Workbook 
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 collection, which contains workbook-level attributes used by Excel when you save a document as a Web page or open a Web page.

Examples

The following code example uses the WebOptions property to enable Portable Network Graphics (PNG) as an output format, download the Office Web components with the specified Web page if they are not already installed, and to allow long file names when the document is saved as a Web page.

This example is for a document-level customization.

Private Sub SetWebOptions()
    Me.WebOptions.AllowPNG = True 
    Me.WebOptions.DownloadComponents = True 
    Me.WebOptions.UseLongFileNames = True 
End Sub
private void SetWebOptions()
{
    this.WebOptions.AllowPNG = true;
    this.WebOptions.DownloadComponents = true;
    this.WebOptions.UseLongFileNames = true;
}

.NET Framework Security

See Also

Reference

Workbook Class

Workbook Members

Microsoft.Office.Tools.Excel Namespace