Export (0) Print
Expand All
Expand Minimize

Workbook.DisplayDrawingObjects Property

Gets or sets how shapes are displayed.

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

public virtual XlDisplayDrawingObjects DisplayDrawingObjects { get; set; }

Property Value

One of the following XlDisplayDrawingObjects values: xlDisplayShapes, xlPlaceholders, or xlHide.

The following code example adds a doughnut shape to worksheet Sheet1 of the current workbook, and then prompts the user to hide drawing objects by using the DisplayDrawingObjects property. If the user hides drawing objects, then the doughnut shape will be invisible; otherwise, the doughnut shape will be visible.

private void AddCustomView()
{
    this.CustomViews.Add("Summary", true, true);

    this.Application.Dialogs[Excel.XlBuiltInDialog.xlDialogCustomViews].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:
© 2014 Microsoft