Version

InsertPageBreak(WorksheetColumn) Method

Inserts a vertical page break to the left of the specified column.
Syntax
'Declaration
 
Public Overloads Sub InsertPageBreak( _
   ByVal column As WorksheetColumn _
) 
public void InsertPageBreak( 
   WorksheetColumn column
)

Parameters

column
The column at which to insert the page break.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionOccurs when column is null.
System.ArgumentExceptionOccurs when column is at the left edge of the Worksheet.
Remarks

If the column is not contained in one of the print areas in the PrintAreas collection, the page breaks added will be as follows: If the column is at the left edge of the Worksheet, an exception will be thrown. If the column is anywhere else in the Worksheet, a vertical page break will be inserted to the left of the column.

If the column is contained in one of the print areas in the PrintAreas collection, the page breaks added will be as follows: If the column is at the left edge of the print area, no page break will be inserted. If the column is anywhere else in the print area, a vertical page break will be inserted to the left of the column.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also