Results 1 to 2 of 2

Thread: Canceling of print to a PDF printer raises an error #482 "Printer error"

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2011
    Palm Coast, FL

    Canceling of print to a PDF printer raises an error #482 "Printer error"

    I use the Printers collection and Print object to print a grid's contents in my app. Two of the printers which appear are PDF printers - an Adobe one and a Microsoft one. Both of these printers cause the problem I'm about to describe...

    If the selected printer is one of the two PDF printers, when a Printer.Print statement is invoked in my printing code, a Save As dialog box automatically appears prompting for the name and location of the PDF file about to be printed. If I provide a folder and file name, all works properly. If I CANCEL out of the Save As dialog, an error is raised and caught by the error handler in my printing routine. The error is #482 whose description is "Printer error". It's a very generic print error code which can arise from any number of issues. So my question is, how can I determine if this is an actual error or just a cancelation of the Save As dialog (which is being shown by the printer driver, not by own code)? I want to handle these two situations differently - i.e. user canceled the print vs an actual error occurred.


  2. #2
    Join Date
    Dec 2004

    Re: Canceling of print to a PDF printer raises an error #482 "Printer error"

    you could use findwindow API to find if the saveAs is shown, then when 482 error occurs, you could check some variable
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts


Click Here to Expand Forum to Full Width