Stop Windows Printing dialog box (1 Viewer)

chuckcoleman

Registered User.
Local time
Today, 12:16
Joined
Aug 20, 2010
Messages
357
One aspect of my Access application runs a VBA application that outputs a report to individual PDF files. There could be up to 1,000 PDF files that are created by the VBA code. When each filtered record of the report creates a PDF file, a Windows Printing dialog box pops up. I've attached a copy.

I would like to find a way to suppress/not show this dialog box. I use a progress bar to provide the user status; the dialog box is just quite annoying.

Any ideas?
 

Attachments

  • PrintingDialog.jpg
    PrintingDialog.jpg
    11.8 KB · Views: 222

BlueIshDan

☠
Local time
Today, 14:16
Joined
May 15, 2014
Messages
1,122
I'd like to think that you don't want to go around to every user's machine and change their registry, which is the first place I'd look to suppress that dialog on the event of printing.

My second strategy would be to try and capture the Hwnd of that dialog and make it transparent.

Let me look into this a bit more for you =]
It is an interesting problem to solve.
 

BlueIshDan

☠
Local time
Today, 14:16
Joined
May 15, 2014
Messages
1,122
Which function are you using to print?
 

chuckcoleman

Registered User.
Local time
Today, 12:16
Joined
Aug 20, 2010
Messages
357
Thanks Dan. Maybe this will help. Windows has a "tool" called SyncToy. It allows you to sync files between folders and typically is run from Task Manager. Someone developed some code called SyncToyHidden.exe. As I recall the description was that it wraps SyncToy and hides it when it runs. I don't know how to look inside the SyncToyHidden.exe file to see what's going on. Maybe you do.

Your second question was what function I'm using to print. Here's the Access vba code that makes it happen:

- DoCmd.OpenReport strReport, acViewPreview, , "[BindNbr] = " & TempVars.Item(strBindCriteria)
- Reports![Report for emailing dues PDF].Visible = False
- DoCmd.OutputTo acOutputReport, strReport, acFormatPDF, "C:\HOA\Invoices\" & strBind & "_Annual Dues.pdf"

The first line above opens the report, the second line makes it invisible, (which unfortunately causes the screen to flicker), and the third line is the code that "prints" the PDF.
 

Users who are viewing this thread

Top Bottom