Returns or sets the options for the Print dialog box.
Object.PrintOptions [ = enPrintOptions ]
The PrintOptions property syntax has the following parts:
Name |
Type |
Description |
Object |
ACommonDialog |
ACommonDialog object |
enPrintOptions |
enumACommonDialogPrintOptions |
An integer specifying the options for the Print dialog box. |
enumACommonDialogPrintOptions can be one of the following:
Name |
Value |
Description |
acdlgPrintOptionsAllPages |
0x00000000 |
The default flag that indicates that the All radio button is initially selected. |
acdlgPrintOptionsCollate |
0x00000010 |
The Collate check box is checked. |
acdlgPrintOptionsDisablePrintToFile |
0x00080000 |
Disables the Print to File check box. |
acdlgPrintOptionsHidePrintToFile |
0x00100000 |
Hides the Print to File check box. |
acdlgPrintOptionsNoPageNums |
0x00000008 |
Disables the Pages radio button and the associated edit controls. |
acdlgPrintOptionsNoSelection |
0x00000004 |
Disables the Selection radio button. |
acdlgPrintOptionsNoWarning |
0x00000080 |
Prevents the warning message from being displayed when there is no default printer. |
acdlgPrintOptionsPageNums |
0x00000002 |
The Pages radio button is selected. |
acdlgPrintOptionsPrintSetup |
0x00000040 |
Causes the control to display the Print Setup dialog box rather than the Print dialog box. |
acdlgPrintOptionsPrintToFile |
0x00000020 |
The Print to File check box is selected. |
acdlgPrintOptionsReturnDC |
0x00000100 |
Causes dialog to return a device context matching the selections the user made in the dialog box. The device context is returned in hDC. |
acdlgPrintOptionsReturnDefault |
0x00000400 |
The control does not display the dialog box. Instead, it initialize its properties with the properties of the default printer and then returns. |
acdlgPrintOptionsReturnIC |
0x00000200 |
Similar to the acdlgPrintOptionsReturnDC flag, except this flag returns an information context rather than a device context. If neither acdlgPrintOptionsReturnDC nor acdlgPrintOptionsReturnIC is specified, hDC is undefined. |
acdlgPrintOptionsSelection |
0x00000001 |
The Selection radio button is selected. |
acdlgPrintOptionsUseDevModeCopies |
0x00040000 |
This flag indicates whether your application supports multiple copies and collation. |
More than one print option may be selected with the use of an OR expression.
The following statement changes the print options of the ACommonDialog to print page numbers and collate:
cdlg1.PrintOptions=(acdlgPrintOptionsPageNums or acdlgPrintOptionsCollate)