Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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)
Syntax
'Declaration
Property PageBreak As Integer
Get
Set
int PageBreak { get; set; }
Property Value
Type: System.Int32
Remarks
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).
Examples
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 Sub SetPageBreak()
Me.CustomerLastNameCell.PageBreak = Excel.XlPageBreak.xlPageBreakManual
End Sub
private void SetPageBreak()
{
this.CustomerLastNameCell.PageBreak =
(int)Excel.XlPageBreak.xlPageBreakManual;
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.