This documentation is archived and is not being maintained.

Range.PageBreak Property

Returns or sets the location of a page break.

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

int PageBreak { get; set; }

Property Value

Type: System.Int32

The return value can be one of the following XlPageBreakconstants:

  • xlPageBreakAutomatic

  • xlPageBreakManual

  • xlPageBreakNone

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).

To remove all manual page breaks on a worksheet, set Cells.PageBreak to xlPageBreakNone.