Version

MaxPagesHorizontally Property

Gets or sets the maximum number of pages allowed in the horizontal direction to print the worksheet.
Syntax
'Declaration
 
Public Property MaxPagesHorizontally As Integer
public int MaxPagesHorizontally {get; set;}

Property Value

The maximum number of pages allowed in the horizontal direction to print the worksheet.
Exceptions
ExceptionDescription
System.ArgumentOutOfRangeException The value assigned is outside the valid range of 0 and 32767.
Remarks

A value of zero indicates no maximum is used in the horizontal direction. As many pages as needed will be used.

Note: For MaxPagesHorizontally and MaxPagesVertically to affect the way the worksheet is printed, ScalingType must be set to a value of FitToPages. However, if the the ScalingType is different and these values aren't used, they will still be saved with the worksheet.

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