ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to capture when a User changes the printer (https://www.excelbanter.com/excel-programming/354043-how-capture-when-user-changes-printer.html)

Jacob

How to capture when a User changes the printer
 
Greetings all,
I have VBA code in the Workbook.BeforePrint procedure that sets the
print area and other items, and it works well. It seems that these
settings are used for the current Application.ActivePrinter only. I
say this because after the BeforePrint procedure fires, if the User
changes the printer in the Print dialog box, any settings I had set are
not applied to the new Application.ActivePrinter.
For example, if I set the scaling to print 1 page wide on the original
printer (in the BeforePrint procedure), then choose a different printer
in the Print dialog box, the newly selected printer has the scaling at
100%.

Any ideas about catching the Application.ActivePrinter change without
writing code that uses the Windows API to catch messages to the
application? Alternatively, is there a way to 're-fire' the
BeforePrint procedure?

TIA for your replies,

Jacob


Jacob

How to capture when a User changes the printer
 
To be clear...
I need to find out about the printer changing AFTER the BeforePrint has
fired.



All times are GMT +1. The time now is 12:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com