#DEFINE cdlPDAllPages 0 && Sets or returns state of All Pages option button. #DEFINE cdlPDCollate 16 && Sets or returns state of Collate check box. #DEFINE cdlPDDisablePrintToFile 524288 && Disables the Print to File check box. #DEFINE cdlPDHidePrintToFile 1048576 && The Print to File check box is not displayed. #DEFINE cdlPDNoPageNums 8 && Sets or returns the state of the Pages option button #DEFINE cdlPDNoSelection 4 && Disables the Selection option button. #DEFINE cdlPDNoWarning 128 && Prevents a warning message when there is no default printer. #DEFINE cdlPDPageNums 2 && Sets or returns the state of the Pages option button. #DEFINE cdlPDPrintSetup 64 && Displays the Print Setup dialog box rather than the Print dialog box. #DEFINE cdlPDPrintToFile 32 && Sets or returns the state of the Print to File check box. #DEFINE cdlPDReturnDC 256 && Returns a device context for the printer selection. #DEFINE cdlPDReturnDefault 1024 && Returns default printer name. #DEFINE cdlPDReturnIC 512 && Returns an information context for the printer selection. #DEFINE cdlPDSelection 1 && Sets or returns the state of the Selection option button. ComDlg = Newobject("mscomdlg.commondialog") with ComDlg .PrinterDefault = .t. .CancelError =.t. * Set flags ( cdl* constants can concatenate flags as operator +:"or")) .Flags = cdlPDReturnDC + cdlPDAllPages .copies=10 &&set here the number of copies(can see it when the dialog is fired below) try .ShowPrinter() catch endtry endwithyou can see more on dialogs in my blog in this link: