This documentation is archived and is not being maintained.

Workbook.Keywords Property

Gets or sets the keywords attached to the workbook.

Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel (in microsoft.office.tools.excel.dll)

public virtual string Keywords { get; set; }

Property Value

The keywords attached to the workbook.

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

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

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);
}

Show: