How can i make a workbook print to multiple printers

shina67

Board Regular
Joined
Sep 18, 2014
Messages
141
Hi All,

I have a workbook that will automatically print a worksheet within it when certain conditions are met.
The problem I have is that this is a multi-user workbook who work from different pc's.
I want the automatic print to print to the printer that is closest to the users pc.
The workbook is shared via OneDrive.
I have tried the usual method of changing it within the print options for that user.
However, when the workbook automatically saves it also saves the printer options for the rest of the users and sends to the printer that it has been changed to.
I am hoping that one of you helpful bunch can come up with a solution for me with this.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
How about something like this?
Code:
Dim strRememberDefaultPrinter As String
strRememberDefaultPrinter = Application.ActivePrinter
Application.ActivePrinter = whatever 'set the printer to what you want
'then do your printing
Application.ActivePrinter = strRememberDefaultPrinter
 
Upvote 0
You would need the printer's network name to use in an array or sequence of print commands. And if the printer is on a different server, you would also need the server name to map to the printer.
 
Last edited:
Upvote 0
Use
Application.ActivePrinter
.. although it is not guaranteed to be "closest"
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,252
Members
452,623
Latest member
Techenthusiast

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