NativeExcel2 for .Net Developer's Reference

IPageBreak.Location Property

Returns the cell (an IRange interface) that defines the page-break location.

[Visual Basic]
PropertyReadOnlyLocationAsIRange
[C#]
IRangeLocation{get;}
[C++]
__propertyIRange*get_Location();
[JScript]
functiongetLocation():IRange

Remarks

Horizontal page breaks are aligned with the top edge of the location cell.

Vertical page breaks are aligned with the left edge of the location cell.

Example

This example sets the interior color of the page-break location to red.

[C#]
book.Worksheets[1].VPageBreaks[1].Location.Interior.Color = Color.Red;
[VisualBasic]
book.Worksheets(1).VPageBreaks(1).Location.Interior.Color = Color.Red
[C++]
IPageBreaks* pbs = book->Worksheets->Item[1]->VPageBreaks;
pbs->Item[1]->Location->Interior->Color = Color::Red;

See Also

IPageBreak Interface | NativeExcel Namespace | IWorksheet.HPageBreaks | IWorksheet.VPageBreaks | IPageBreaks Interface