Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
1 touch printing macro
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? 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* -- tygi ------------------------------------------------------------------------ tygi's Profile: http://www.excelforum.com/member.php...o&userid=26769 View this thread: http://www.excelforum.com/showthread...hreadid=400260 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
1 touch printing macro
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 -- bill k ------------------------------------------------------------------------ bill k's Profile: http://www.excelforum.com/member.php...nfo&userid=821 View this thread: http://www.excelforum.com/showthread...hreadid=400260 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
disable touch pad | Excel Worksheet Functions | |||
HELP! My Spreadsheet just disappeared - what did I touch??? | Excel Discussion (Misc queries) | |||
Can I set up a spreadsheet to count taps on a touch screen? | Excel Discussion (Misc queries) | |||
How to hide pre-defined columns at the touch of a button | Excel Programming | |||
Help for final touch up to my code | Excel Programming |