A user can control *everything* (printer, paper size, orientation, print quality, etc.) from within the print setup common dialog. In fact, here is all the code you need:
Sub FilePrintSetup_Click ()
Dim Msg$
On Error GoTo FilePrintSetupError
CMDialog1.Flags = PD_PRINTSETUP ' Just enable print setup
CMDialog1.Action = DLG_PRINT ' Show printer setup dialog box
PrintSetupExit:
Exit Sub
FilePrintSetupError:
If Err <> CDERR_CANCEL Then ' If user didn't select CANCEL
Beep
Msg$ = "Error" & Str$(Err) & ": " & Error$
MsgBox Msg$, MB_ICONEXCLAMATION, "Error"
End If
Resume PrintSetupExit
End Sub
The capitalized constants are defined in CONSTANT.TXT. You do need t to set the CancelError property to True if you want the CDERR_CANCEL error to indicate the user pressed Cancel. (Even this really isn't needed, though).
|