Hi, i am building a crystal report and calling it using Accpac API. However, i would like to make it so that the user can select the printer as he/she prints.
The above code works to get the printer selection window if print destination is set to printer. However, if the user presses "Cancel on the userform" the document is still printed.
How can this be avoided?
Code:
Dim rpt As AccpacCOMAPI.AccpacReport
Set rpt = ReportSelect(report, " ", " ")
Dim rptPrintSetup As AccpacCOMAPI.AccpacPrintSetup
Set rptPrintSetup = GetPrintSetup(" ", " ")
If rptPrintSetup.Destination = PD_PRINTER Then
rptPrintSetup.Query (0)
End If
How can this be avoided?