Expand Minimize
This topic has not yet been rated - Rate this topic

WorkbookBase.Comments Property

Gets or sets the comments attached to the workbook.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v4.0.Utilities (in Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)
public string Comments { get; set; }

Property Value

Type: String
The comments attached to the workbook.

This property corresponds to the Comments field in the workbook's Properties dialog.

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 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();
}
Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.