PrintSheet Method
See Also DLL Example 1 Example 2
Applies To
fpSpread control
Description
Prints a sheet.
Syntax
void CSpreadSheet::PrintSheet(VARIANT* Flags);
fpSpread1.PrintSheet([Flags As Variant])
Parameters
The following parameter is available:
Parameter | Description | ||
---|---|---|---|
Flags | (Optional in Visual Basic) Specifies whether to print or to display the common Print dialog Choose one of the following: |
||
Value | Constant | Description | |
0 | PrintFlagsNone | (Default) Prints the sheet according to the settings for the print properties | |
1 | PrintFlagsShowCommonDialog | Displays the common Print dialog |
Remarks
Call this method to print a sheet. Specify the sheet to print by setting the Sheet property before calling the PrintSheet method.
If you want to customize the printout, you can set print properties before calling this method. Print properties include options such as printing only certain ranges of cells, specifying page breaks, including headers and footers, setting print margins, and many others, as listed in the following table:
Note: If you want to use the SmartPrint option provided by the PrintScalingMethod property, do not set the Flags parameter to PrintFlagsShowCommonDialog. |
When the sheet is sent to the printer, the PrintMsgBox and PrintAbort events occur. If you have set the ScriptEnhanced property to True for the ActiveX control, the ScriptPrintMsgBox and the ScriptPrintAbort events occur instead of the PrintMsgBox and PrintAbort events.
Return Type
None
See Also
PrintAbortMsg, PrintBestFitPagesTall, PrintBestFitPagesWide, PrintBorder, PrintCenterOnPageH, PrintCenterOnPageV, PrintColHeaders, PrintColor, PrintFirstPageNumber, PrintFooter, PrintGrid, PrintHeader, PrintJobName, PrintMarginBottom, PrintMarginLeft, PrintMarginRight, PrintMarginTop, PrintNextPageBreakCol, PrintNextPageBreakRow, PrintOrientation, PrintPageCount, PrintPageEnd, PrintPageOrder, PrintPageStart, PrintRowHeaders, PrintScalingMethod, PrintShadows, PrintType, PrintUseDataMax, PrintZoomFactor, ScriptEnhanced, Sheet properties
OwnerPrintDraw, OwnerPrintPageCount methods
PrintMsgBox, PrintAbort events
DLL Correspondence
SSPrint function