Applies To
Chart Object, Charts Collection, DialogSheet Object, DialogSheets Collection, Module Object, Modules Collection, Range Object, Sheets Collection, Window Object, Workbook Object, Worksheet Object, Worksheets Collection.
Description
Prints the object.
Syntax
object.PrintOut(from, to, copies, preview, activePrinter, printToFile, collate)
object
Required. The object to print.
from
Optional. The number of the page with which to start printing. If omitted, printing starts at the beginning.
to
Optional. The number of the last page to print. If omitted, printing goes to the last page.
copies
Optional. The number of copies to print. If omitted, one copy is printed.
preview
Optional. If True, Microsoft Excel invokes print preview before printing the object. If False (or omitted) the object is printed immediately.
activePrinter
Optional. Sets the name of the active printer.
printToFile
Optional. If True, printing goes to a file. Microsoft Excel prompts the user to enter the name of the output file. There is no way to specify the output filename from Visual Basic.
collate
Optional. If True, multiple copies are collated.
Remarks
"Pages" in the descriptions of from and to refers to printed pages-not overall pages in the sheet or workbook.
This method applies to the Window object only when it is the Info window.
See Also
PrintArea Property, PrintPreview Method.
Example
This example prints the active sheet.
ActiveSheet.PrintOut