CHANGING PRINTER DEFAULTS

O

OLDJAY

I HAVE THE FOLLOWING CODE TO CHANGE THE DEFAULT PRINTER
WHEN I WANT TO PRINT A PDF FILE. THIS WORKS FINE MOST OF
THE TIME BUT EVEY ONCE IN A WHILE IT HANGS BECAUSE THE PDF
PRINTER IS ON "Ne01". IF I CHANGE THE VALUE FROM Ne00 to
Ne01 THE ROUTINE WILL CONTINUE.

QUESTION: WHAT IS Ne00, Ne01, etc WHY IS IT CHANGING



CurrentPrinter = Application.ActivePrinter ' Store
current printer.
Application.ActivePrinter = "PDF995 on Ne00:" ' Change
Printers."
ActiveWindow.SelectedSheets.PrintOut ' Print the
active document.
Application.ActivePrinter = CurrentPrinter ' Set
printer back to current.
ActiveWorkbook.Close
 
G

Guest

I am having the exact Question. To Change my activeprinter in need the "on NEnn". I looked at Enumprinters and do not see the "NEnn" being returned there. I am trying to create an automatically printing spreadsheet and can't affort to hard code this in the Code and have it fail. If anyone can enlighten us as to what this NEnn is and how to fiind it that would be great! Thanks!
 

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

Top