StopPrinting = False
On Error GoTo errhandler
CommonDialog1.PrinterDefault = True
CommonDialog1.CancelError = True
CommonDialog1.Flags = cdlPDReturnDC + cdlPDNoPageNums
CommonDialog1.ShowPrinter
Printer.Print ""
Printer.Print " aaaa"
Printer.Print " bbb "
Printer.EndDoc
errhandler:
Select Case Err
Case 32755
MsgBox "Dokum iptal edildi.."
Case Else
End Select
End Sub