I am currently running a handful of access reports, that are defaulted to print to "Adobe PDF" using the page setup feature.
When I print the reports, I get a "save PDF As" dialogue before they are printed. I would like to have this feature removed and automated to eliminate user interaction.
I tried using the basSaveAsPDF module found in the FAQ however I still get this dialogue.
Does anyone have suggestions on how I can have this done. My code is below.
Thank you!
Private Sub cmdCreateAssertions_Click()
If tLE_Assertion Then
stDocName = "rpt_LEGAL"
DoCmd.OpenReport stDocName, acViewNormal
DoCmd.Close acReport, stDocName, acSaveNo
End If
If tLOB_Assertion Then
stDocName = "rpt_LOB"
DoCmd.OpenReport stDocName, acViewNormal
DoCmd.Close acReport, stDocName, acSaveNo
End If
If tSAO_Assertion Then
stDocName = "rpt_SAO"
DoCmd.OpenReport stDocName, acViewNormal
DoCmd.Close acReport, stDocName, acSaveNo
End If
If tSBU_Assertion Then
stDocName = "rpt_SBU"
DoCmd.OpenReport stDocName, acViewNormal
DoCmd.Close acReport, stDocName, acSaveNo
End If
'Else
'GoTo ExitHere
'End If
ExitHere:
Display_Message ""
Exit Sub
HandleErr:
Select Case Err
Case Else
MsgBox "cmdCreateAssertions_Click " & Err & ": " & Err.Description
Resume ExitHere
End Select
End Sub
When I print the reports, I get a "save PDF As" dialogue before they are printed. I would like to have this feature removed and automated to eliminate user interaction.
I tried using the basSaveAsPDF module found in the FAQ however I still get this dialogue.
Does anyone have suggestions on how I can have this done. My code is below.
Thank you!
Private Sub cmdCreateAssertions_Click()
If tLE_Assertion Then
stDocName = "rpt_LEGAL"
DoCmd.OpenReport stDocName, acViewNormal
DoCmd.Close acReport, stDocName, acSaveNo
End If
If tLOB_Assertion Then
stDocName = "rpt_LOB"
DoCmd.OpenReport stDocName, acViewNormal
DoCmd.Close acReport, stDocName, acSaveNo
End If
If tSAO_Assertion Then
stDocName = "rpt_SAO"
DoCmd.OpenReport stDocName, acViewNormal
DoCmd.Close acReport, stDocName, acSaveNo
End If
If tSBU_Assertion Then
stDocName = "rpt_SBU"
DoCmd.OpenReport stDocName, acViewNormal
DoCmd.Close acReport, stDocName, acSaveNo
End If
'Else
'GoTo ExitHere
'End If
ExitHere:
Display_Message ""
Exit Sub
HandleErr:
Select Case Err
Case Else
MsgBox "cmdCreateAssertions_Click " & Err & ": " & Err.Description
Resume ExitHere
End Select
End Sub