View Full Version : Automatically print to default printer


mark curtis
05-09-2001, 03:49 AM
Can anyone tell me how to automatically print to my default printer via a command button?

Below is the code I use to automatically print from a command button but it does not select the default printer?

Private Sub Print1_Click()
On Error GoTo Err_Print1_Click

Dim stDocName As String

stDocName = "rptHighlight Report for Projects"
DoCmd.OpenReport stDocName, acNormal

Exit_Print1_Click:
Exit Sub

Err_Print1_Click:
MsgBox Err.Description
Resume Exit_Print1_Click

End Sub

Thanks
Mark

Rich
05-09-2001, 05:05 AM
The quickest and easiest way is to use page set up on the file menu while the report is in design mode.
HTH