setting the default printer for this workbook only

  • Thread starter Thread starter mikecoxffbb
  • Start date Start date
M

mikecoxffbb

i cant figure out how to set and ar save a particular workbook so that only
that workbook prints to a printer that is not my default printer. i woudl
like to keep it like this so i dont have to go and change the printer in the
primnt menue everytime i print. can anyone help me ?
 
Hi,

Excel does not support a feature such as this, although you might be able to
program it.

It would look something like this

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Application.ActivePrinter = "Microsoft Office Document Image Writer
on Ne01:"
End Sub

To do this you need to record the macro, turn on the recorder - Tools,
Macros, Record new macro, leave the default name, make sure it is Storing to
This workbook.
After you click OK, choose File, Print and either pick the Name from the
list or choose Find Printer...
Eventually click OK to print and then Stop the Recorder - choose Tools,
Macros, Stop recorder.

The code needs to go into the thisWorkbook_BeforePrint macro. Press
Alt+F11, in the Project window at the top left find your workbook's name and
under it the item called thisWorkbook, double-click it and enter the lines of
code I gave you but put you code between the Sub and End Sub lines. Your
code will be in a folder under your filename in the project window called
Modules, in that folder double-click Module 1 and copy the line that looks
like mine from between the Sub and the End Sub lines, paste it in the
thisWork code we just entered.


If this helps, please click the Yes button.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top