Table of contents
TOC
Collapse the table of content
Expand the table of content

Sheets.PrintOut Method (Excel)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Prints the object.

Syntax

expression . PrintOut( From , To , Copies , Preview , ActivePrinter , PrintToFile , Collate , PrToFileName , IgnorePrintAreas )

expression A variable that represents a Sheets object.

Parameters

NameRequired/OptionalData TypeDescription
FromOptionalVariantThe number of the page at which to start printing. If this argument is omitted, printing starts at the beginning.
ToOptionalVariantThe number of the last page to print. If this argument is omitted, printing ends with the last page.
CopiesOptionalVariantThe number of copies to print. If this argument is omitted, one copy is printed.
PreviewOptionalVariantTrue to have Microsoft Excel invoke print preview before printing the object. False (or omitted) to print the object immediately.
ActivePrinterOptionalVariantSets the name of the active printer.
PrintToFileOptionalVariantTrue to print to a file. If PrToFileName is not specified, Microsoft Excel prompts the user to enter the name of the output file.
CollateOptionalVariantTrue to collate multiple copies.
PrToFileNameOptionalVariantIf PrintToFile is set to True , this argument specifies the name of the file you want to print to.
IgnorePrintAreasOptionalVariantTrue to ignore print areas and print the entire object.

Return Value

Variant

Remarks

"Pages" in the descriptions of From and To refers to printed pages ? not overall pages in the sheet or workbook.

Examples

Prints Active Sheet

ActiveSheet.PrintOut

Prints from Page X to Page Y

Prints from page 2 to page 3.

Worksheets. ("sheet1").PrintOut From:=2, To:=3

Prints 3 Copies

Prints three copies from page 2 to page 3.

Worksheets. ("sheet1").PrintOut From:=2, To:=3, Copies:=3

See also

Concepts

Sheets Object

© 2018 Microsoft