Help needed with VBA for printer settings popup

water1

New Member
Joined
Dec 7, 2011
Messages
2
Hi guys long time user 1st time poster.

I am hoping someone will be able to give me a hand or at least point me in the right direction.

we are looking at a number of ways to curb paper use (currently 25,000 a week). I found that often people printed multiple copies due to the settings not being what they thought they were or needed for that particular document.

Now i have thought of having multiple drivers for particular settings, however this will not be practical as each person has an option of two different printers in their section and there are a large number of different combinations in styles of printing required.

What im looking for is a before print macro that will querrie the printer settings and display them in a popup prior to being sent to the printer.

E.g. i have my document and click on print or file>print then before it actually prints up pops a window that states my current settings.
paper size - A4
select color - color
color settings - photo
duplex - yes
orientation - landscape.

then it asks whether this is correct

if you click yes it is sent to printer if no then it cancels the print command.

Now there is a way to change the settings using Windows API
http://www.lessanvaezi.com/changing-...e-windows-api/

however its not exactly what i would like and i can seem to get it to work.

Any suggestions or help welcome
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Below are some of the attributes you seek that can be defined in Excel , and one spawning of the dialogue ...
I believe the Color and duplex attributes are print-driver specific, so yes, more work to dig those out.

Code:
Debug.Print Application.XlPageOrientation
Debug.Print Application.PageSetup.PaperSize
Debug.Print Application.PageSetup.BlackAndWhite
Debug.Print Application.PageSetup.Orientation
 
Application.Dialogs(xlDialogPrint).Show
 
Upvote 0

Forum statistics

Threads
1,215,636
Messages
6,125,952
Members
449,276
Latest member
surendra75

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top