Export (0) Print
Expand All
Expand Minimize

NamedRange.ClearOutline Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Clears the outline for the NamedRange control.

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

Object ClearOutline()

Return Value

Type: System.Object

The following code example uses the AutoOutline method to create an outline for a NamedRange control, and then prompts you to clear the outline by calling the ClearOutline method.

This example is for a document-level customization.

private void SetOutline()
{
    Microsoft.Office.Tools.Excel.NamedRange namedRange1 =
        this.Controls.AddNamedRange(this.Range["A1", "C5"],
        "namedRange1");

    namedRange1.AutoOutline();

    if (MessageBox.Show("Clear the outline?", "Test",
        MessageBoxButtons.YesNo) == DialogResult.Yes)
    {
        namedRange1.ClearOutline();
    }
}

Show:
© 2014 Microsoft