1 touch printing macro

T

tygi

I have a problem setting up my printer macro. Excel sets up a printing
session that won't allow my macro to work. So is there a way to bypass
or override the printing session (Ne01) that it sets up? :mad: This
macro is supposed to choose a printer, then after printing the
document, it should change it back to the default printer. Please tell
me how to write the proper code.

*Sub Macro3()
'
' Macro3 Macro
' Macro recorded 8/12/2005 by Tygi

'
Application.ActivePrinter = "\\ATLAS\DoorshopRicoh1013F on Ne01:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"\\ATLAS\DoorshopRicoh1013F on Ne01:", Collate:=True
Application.ActivePrinter = "\\ATLAS\Ricoh1013FPCL6 on Ne01:"
End Sub*
 
B

bill k

Not sure whether this could also be the problem at your
place.............but

I have been working with this solution for a while now.
We had the problem of the network assigning different numbers to the
network printers using Ne01, Ne02, Ne03 or Ne04.
This macro will search the possibilities and always find the right
one.
It will then execute the print job and go back to the default printer



Sub selectprntrandprintlbl()
Dim oldpname As String
Dim temppname As String
oldpname = Application.ActivePrinter
For j = 0 To 9
On Error Resume Next
temppname = "\\nzdfprn01\Label_UHT_Sato on Ne0" & j & ":"
Application.ActivePrinter = temppname
If Application.ActivePrinter = temppname Then
Exit For
End If
Next j
Application.ActivePrinter = "temppname"
prntlbl
'prntlbl is the name of a macro
Application.ActivePrinter = oldpname

End Sub

Hope that helps
 

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

Similar Threads


Top