Version

GetSheetPrintOptions Method

Gets the print options associated with the specified sheet.
Syntax
'Declaration
 
Public Function GetSheetPrintOptions( _
   ByVal sheet As Sheet, _
   Optional ByVal createIfNull As Boolean _
) As PrintOptionsBase
public PrintOptionsBase GetSheetPrintOptions( 
   Sheet sheet,
   bool createIfNull
)

Parameters

sheet
The sheet whose associated print options are to be retrieved.
createIfNull
True to create the print options if it has not yet been allocated. The options will be initialized based on the current state of the Sheet. Note the options should only have been null if there were no options for the Sheet when the Workbook was loaded. Also this will not allocate the collection unless the SavePrintOptions is true.

Return Value

Null if SavePrintOptions is False or if the sheet does not belong to the workbook associated with this custom view; otherwise, the print options associated with the sheet.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionsheet is null.
Remarks

Setting properties on the returned PrintOptionsBase instance will not change the actual print settings of the sheet. After setting properties, the Apply method of the CustomView will apply them to the sheet.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, 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