Workbook.Title Property (2007 System)
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.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)
Syntax
'Declaration
<BrowsableAttribute(False)> _
Public Property Title As String
'Usage
Dim instance As Workbook
Dim value As String
value = instance.Title
instance.Title = value
[BrowsableAttribute(false)]
public string Title { get; set; }
[BrowsableAttribute(false)]
public:
property String^ Title {
String^ get ();
void set (String^ value);
}
public function get Title () : String
public function set Title (value : String)
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(
missing, missing, missing, missing, missing, missing,
missing, missing, missing, missing, missing, missing,
missing, missing, missing, missing, missing, missing,
missing, missing, missing, missing, missing, missing,
missing, missing, missing, missing, missing, missing);
}
.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.