shrug-l: Default printer question

John Marquez MarquezJ@mail.co.leon.fl.us
Fri, 14 Jan 2005 08:04:52 -0500


Jay,
To set the default printer in Word 2002 (for all applications!) go to
tools|Macro|Visual Basic Editor. Right-click on Normal, insert|module
and insert the following code:
Public Sub AutoExec()
   Application.ActivePrinter = "HP Business Inkjet 2600 PS"
End Sub
Word will run this code when it starts up.


Here's vb script that will set the default printer and run a program.
Copy and paste it into a text editor and save as .vbs, doubleclick to
run.

' VBScript to set the local Default Printer
' Guy Thomas February 2004.
' http://www.computerperformance.co.uk/ezine/ezine17.htm 
' ******************************
Option Explicit
Dim objPrinter
Set objPrinter = CreateObject("WScript.Network") 
objPrinter.SetDefaultPrinter "HP LaserJet 4100 PCL 6"
Set objPrinter = Nothing
' 
'
' Added Run Program Code
' John Marquez Jan 2005
Dim oShell
Set oShell = WScript.CreateObject ("WSCript.shell")
oShell.run
"H:\\ClipShapeExport2dxf\\LidarClipping\\lidarclipper122504.apr", 0,
False
Set oShell = Nothing

John M

John Marquez
GIS Specialist II
Tallahassee/Leon County MIS/GIS
Leon County Courthouse
301 S. Monroe Street  P3 Level
Tallahassee, Fl. 32301
Ph.850-488-2818
Fax.850-922-0099
marquezj@mail.co.leon.fl.us


>>> "Jay Johnson" <JohnsonJa@mail.co.leon.fl.us> 1/13/2005 2:21:09 PM
>>>
Does anyone know if it is possible to set different default printers
on
an application-by-application basis?  It would be great to have a
large
format plotter set as the default printer in ArcGIS but have a
laser-jet
set as default for Word and Excel.

I know I'm not the only one who has sent Word documents to the plotter
by accident...


Jay Johnson
Leon County Public Works
Tallahassee/Leon County Interlocal GIS
(850) 488-8003
_______________________________________________
SHRUG-L mailing list
SHRUG-L@lists.dep.state.fl.us 
http://lists.dep.state.fl.us/mailman/listinfo/shrug-l