WorkbookBase.Title Property

Gets or sets the title of the Web page when the workbook is saved as 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 Property Title As String
public string Title { get; set; }

Property Value

Type: System.String
The title of the Web page when the workbook is saved as a Web page.

Remarks

The title is usually displayed in the window title bar when the document is viewed in the Web browser.

Examples

The following code example sets values in the Comments, Title and Tag properties and then programmatically displays the Microsoft Office Excel Properties dialog to verify that these values were set.

This example is for a document-level customization.

Private Sub AddWorkbookMetadata()
    Me.Comments = "This workbook contains sales data from 2004." 
    Me.Title = "Sales Data" 
    Me.Tag = "Sales" 
    Me.Keywords = "Sales" 
    Me.Application.Dialogs( _
        Excel.XlBuiltInDialog.xlDialogProperties).Show()
End Sub
private void AddWorkbookMetadata()
{
    this.Comments = "This workbook contains sales data from 2004.";
    this.Title = "Sales Data";
    this.Tag = "Sales";
    this.Keywords = "Sales";

    this.Application.Dialogs[
        Excel.XlBuiltInDialog.xlDialogProperties].Show();
}

.NET Framework Security

See Also

Reference

WorkbookBase Class

Microsoft.Office.Tools.Excel Namespace