NativeExcel for .Net Developer's Reference

IPageBreak.Location Property

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

[Visual Basic]
Property ReadOnly Location As IRange
[C#]
IRange Location { get; }
[C++]
__property IRange* get_Location();
[JScript]
function get Location() : 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;
[Visual Basic]
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