0 out of 2 rated this helpful - Rate this topic

Sheets.PrintOut Method 

Prints the object.

Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in microsoft.office.interop.excel.dll)

'Usage
Dim From As Object
Dim To As Object
Dim Copies As Object
Dim Preview As Object
Dim ActivePrinter As Object
Dim PrintToFile As Object
Dim Collate As Object
Dim PrToFileName As Object
Dim sheets1 As Sheets
sheets1.PrintOut(From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName)
void PrintOut(
	[In, Optional] object From, 
	[In, Optional] object To, 
	[In, Optional] object Copies, 
	[In, Optional] object Preview, 
	[In, Optional] object ActivePrinter, 
	[In, Optional] object PrintToFile, 
	[In, Optional] object Collate, 
	[In, Optional] object PrToFileName
);
public void PrintOut(
	/*in*/System.Object From, 
	/*in*/System.Object To, 
	/*in*/System.Object Copies, 
	/*in*/System.Object Preview, 
	/*in*/System.Object ActivePrinter, 
	/*in*/System.Object PrintToFile, 
	/*in*/System.Object Collate, 
	/*in*/System.Object PrToFileName
);
function PrintOut(
	 From : Object, 
	 To : Object, 
	 Copies : Object, 
	 Preview : Object, 
	 ActivePrinter : Object, 
	 PrintToFile : Object, 
	 Collate : Object, 
	 PrToFileName : Object
);

Parameters

From

Optional Object. The number of the page at which to start printing. If this argument is omitted, printing starts at the beginning.

To

Optional Object. The number of the last page to print. If this argument is omitted, printing ends with the last page.

Copies

Optional Object. The number of copies to print. If this argument is omitted, one copy is printed.

Preview

Optional Object. True to have Microsoft Excel invoke print preview before printing the object. False (or omitted) to print the object immediately.

ActivePrinter

Optional Object. Sets the name of the active printer.

PrintToFile

Optional Object. 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

Optional Object. True to collate multiple copies.

PrToFileName

Optional Object. If PrintToFile is set to True, this argument specifies the name of the file you want to print to.

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


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ