I am using following code to generate a print dialogue by using a command button for the report. By using print dialog just by selecting PDF in the printername...changing it to into PDF format.
But I want the report to be converted into PDF directly without prompting print dialog.
Private Sub Wrapper_History_Click()
On Error GoTo Err_Wrapper_History_Click
Dim stDocName As String
DoCmd.OpenReport "rptEventLog", acPreview, , _
"[TrackingNumber] = Forms!frmReviewReleaseWrapper!RevRelTrackingNumber"
DoCmd.RunCommand acCmdPrint
Exit_Wrapper_History_Click:
Exit Sub
Err_Wrapper_History_Click:
MsgBox Err.Description
Resume Exit_Wrapper_History_Click
End Sub