PageBreak Property
TOC
Collapse the table of content
Expand the table of content

XmlMappedRange.PageBreak Property

Gets or sets the location of a page break.

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

int PageBreak { get; set; }

Property Value

Type: System.Int32

You can set this property using one of the following XlPageBreak values:

This property can return the location of either automatic or manual page breaks, but it can only set the location of manual breaks (it can only be set to xlPageBreakManual or xlPageBreakNone).

The following code example uses the PageBreak property to set a page break at an XmlMappedRange. This code example assumes that the current worksheet contains an XmlMappedRange named CustomerLastNameCell.


private void SetPageBreak()
{
    this.CustomerLastNameCell.PageBreak = 
        (int)Excel.XlPageBreak.xlPageBreakManual;
}


Community Additions

ADD
Show:
© 2016 Microsoft