Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

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:
© 2015 Microsoft