Skip to content

"Waiting for printer connection" when exporting#683

Description

@Indigo744

Hello!

I hope this message finds you well 馃槃

Lately, I have been having a weird message popping up when exporting my application:
Image

In French, it says "Waiting for printer connection, or cancel the connection".

After investigating doing a step by step debugging, I found out that the issue come from this line in clsDevMode

    ' Attempt to load the printer object
    Set objPrinter = GetPrinterByName(strPrinter)

Namely, looping through all Application.Printers triggers this popup : GetPrinterByName()

It searches for the "Microsoft Print to PDF" printer, but the popup is coming from another one. This is happening because I have a Brother Laser printer that is offline most of the time.

Now, I know this is specific to my setup, I could simply remove this printer, or start it before I export. But this is not very user friendly, especially when I want to print with this printer...

I wonder if it would be possible to get the printer settings without looping through all printers?

In the doc, it seems we could directly get the printer by its name without looping: https://learn.microsoft.com/en-us/office/vba/api/access.printer

If I can find a bit more time, I will try this.

Thank you and have a nice day!

Metadata

Metadata

Assignees

No one assigned

    Labels

    pending resolvedPossibly resolved, needs testing or confirmation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions