Worksheet.PrintOut Method (Excel)
Prints the object.
식 .PrintOut(From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName, IgnorePrintAreas)
식 A variable that represents a Worksheet object.
Name |
Required/Optional |
Data Type |
Description |
---|---|---|---|
From |
선택 |
Variant |
The number of the page at which to start printing. If this argument is omitted, printing starts at the beginning. |
To |
선택 |
Variant |
The number of the last page to print. If this argument is omitted, printing ends with the last page. |
Copies |
선택 |
Variant |
The number of copies to print. If this argument is omitted, one copy is printed. |
Preview |
선택 |
Variant |
True to have Microsoft Excel invoke print preview before printing the object. False (or omitted) to print the object immediately. |
ActivePrinter |
선택 |
Variant |
Sets the name of the active printer. |
PrintToFile |
선택 |
Variant |
True to print to a file. If PrToFileName is not specified, Microsoft Excel prompts the user to enter the name of the output file. |
Collate |
선택 |
Variant |
True to collate multiple copies. |
PrToFileName |
선택 |
Variant |
If PrintToFile is set to True, this argument specifies the name of the file you want to print to. |
IgnorePrintAreas |
선택 |
Variant |
True to ignore print areas and print the entire object. |
Variant
"Pages" in the descriptions of From and To refers to printed pages — not overall pages in the sheet or workbook.
This example prints the active sheet.
ActiveSheet.PrintOut