Spread 8.0 Documentation
PrintSheet Method
Support Options
ActiveX Reference > ActiveX Methods > PrintSheet Method

Glossary Item Box

PrintSheet Method


See Also    DLL    Example 1    Example 2

Applies To

fpSpread control

Description

Prints a sheet.

Syntax

C++

void CSpreadSheet::PrintSheet(VARIANT* Flags);

Visual Basic

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:

PrintAbortMsg PrintGrid PrintPageCount
PrintBestFitPagesTall PrintHeader PrintPageEnd
PrintBestFitPagesWide PrintJobName PrintPageOrder
PrintBorder PrintMarginBottom PrintPageStart
PrintCenterOnPageH PrintMarginLeft PrintRowHeaders
PrintCenterOnPageV PrintMarginRight PrintScalingMethod
PrintColHeaders PrintMarginTop PrintShadows
PrintColor PrintNextPageBreakCol PrintType
PrintFirstPageNumber PrintNextPageBreakRow PrintUseDataMax
PrintFooter PrintOrientation PrintZoomFactor

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

Printing a Sheet

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

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.