WorkbookBase.WebOptions Property
Gets the Microsoft.Office.Interop.Excel.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.v4.0.Utilities (in Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)
Syntax
'Declaration
Public ReadOnly Property WebOptions As WebOptions
public WebOptions WebOptions { get; }
Property Value
Type: Microsoft.Office.Interop.Excel.WebOptions
The Microsoft.Office.Interop.Excel.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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.