PrinterSetupDialog1:TPrinterSetupDialog; begin PrinterSetupDialog1:=TPrinterSetupDialog.create(nil); if PrinterSetupDialog1.Execute then begin excel.application.ActivePrinter:=printer.Printers[printer.PrinterIndex]; excel.printout; end; PrinterSetupDialog1.free; end;