LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 221
Default Changing printer defaults in Excel Worksheets

G'day J

I used this code a long time ago, but it should still be relavent in 2007

Change the range & ActivePrinter to suit

ActiveSheet.Select
Range("Z1:AH51").Select
ActiveSheet.PageSetup.PrintArea = "$Z$1:$AH$51"
Application.ActivePrinter = "HP LaserJet 1200 Series PCL 6 on LPT1:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True

If you have multiple worksheets that have differing print requirements:

Create a macro for each sheet that requires different print needs and change
the code to suit. e.g:

ActiveSheet.Select
Range("A1:A100").Select
ActiveSheet.PageSetup.PrintArea = "$A$1:$A$100"
Application.ActivePrinter = "MyLaserJet on MyNetwork:"
ActiveWindow.SelectedSheets.PrintOut Copies:=10, Collate:=True
or
ActiveSheet.Select
Range("D10:D20").Select
ActiveSheet.PageSetup.PrintArea = "$D$10:$D$20"
Application.ActivePrinter = "MyOtherLaserJet on MyOtherNetwork:"
ActiveWindow.SelectedSheets.PrintOut Copies:=100, Collate:=False

Ask your IT people for the Actual location of your printer(s) on the
network.

HTH
Mark.



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing Excel defaults David Schwartz Excel Discussion (Misc queries) 1 January 9th 09 06:59 PM
Printer Multiple Worksheets with a particular Printer Setting PP[_2_] Excel Worksheet Functions 0 March 14th 07 02:02 PM
Changing Excel defaults Tom Kreutz Excel Discussion (Misc queries) 2 March 2nd 06 02:25 PM
Excel changing Default Printer Brad Excel Programming 1 January 7th 05 04:02 PM
CHANGING PRINTER DEFAULTS OLDJAY Excel Programming 1 May 12th 04 09:51 PM


All times are GMT +1. The time now is 04:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"