Workbook.DisplayDrawingObjects Property (2007 System)

Gets or sets how shapes are displayed.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)

public XlDisplayDrawingObjects DisplayDrawingObjects { get; set; }

Property Value

Type: XlDisplayDrawingObjects
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.

This example is for a document-level customization.

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

Community Additions

ADD
Show: