WorksheetBase.PrintPreview Method (Object)


Shows a preview of the worksheet as it would look when printed.

Namespace:   Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v4.0.Utilities (in Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)

public void PrintPreview(
	object enableChanges


Type: System.Object

For information on optional parameters, see Optional Parameters in Office Solutions.

The following code example uses the PrintPreview method to display a print preview of the current worksheet.

This example is for a document-level customization.

private void PreviewWorksheet()
    // Make sure the worksheet has some data before displaying 
    // a print preview.
    this.Range["A1"].Value2 = "123";
Return to top