Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Setting Print Size for varying Printer use

I have a workbook with about 20 tabs and would like them all to prin
out one page tall, one page wide on 11 x 17 paper. I can highlight al
tabs and change the setting to 11 x 17, but if I access the file o
another computer with a different printer, it resets th
configuration.

Is there a way to push a command button that changes the print size t
11 x 17 and prints the page on the default printer? Need help with th
code

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Setting Print Size for varying Printer use

You can get the code by turning on the macro recorder and making the change
to one sheet.

this will record all settings, even though you only change one. You don't
need to do all settings.

Select the subset you need and put this in the BeforePrint Event of the
workbook

http://www.cpearson.com/excel/events.htm

--
Regards,
Tom Ogilvy


"indigo " wrote in message
...
I have a workbook with about 20 tabs and would like them all to print
out one page tall, one page wide on 11 x 17 paper. I can highlight all
tabs and change the setting to 11 x 17, but if I access the file on
another computer with a different printer, it resets the
configuration.

Is there a way to push a command button that changes the print size to
11 x 17 and prints the page on the default printer? Need help with the
code!


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 132
Default Setting Print Size for varying Printer use

Dear Indigo;

Use the following macro that will run automatically when
they open the work book. You will need to modify it to
run for each page.

Sub Auto_Open()

With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.75)
.RightMargin = Application.InchesToPoints(0.75)
.TopMargin = Application.InchesToPoints(1)
.BottomMargin = Application.InchesToPoints(1)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = -3
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
.PrintErrors = xlPrintErrorsDisplayed
End With
End Sub


Thanks,

Greg


-----Original Message-----
I have a workbook with about 20 tabs and would like them

all to print
out one page tall, one page wide on 11 x 17 paper. I can

highlight all
tabs and change the setting to 11 x 17, but if I access

the file on
another computer with a different printer, it resets the
configuration.

Is there a way to push a command button that changes the

print size to
11 x 17 and prints the page on the default printer? Need

help with the
code!


---
Message posted from http://www.ExcelForum.com/

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Setting Print Size for varying Printer use

This will do one page, and take a long time. It does represent what you get
when you record a macro, but not sure how
.PaperSize = xlPaperLetter
would set it to 11 x 17

This part does do the fitting:

.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1



all three lines are needed.

So as I said, you need to trim out command that are not needed such as the
headers and margins.

--
Regards,
Tom Ogilvy


"Gjones" wrote in message
...
Dear Indigo;

Use the following macro that will run automatically when
they open the work book. You will need to modify it to
run for each page.

Sub Auto_Open()

With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.75)
.RightMargin = Application.InchesToPoints(0.75)
.TopMargin = Application.InchesToPoints(1)
.BottomMargin = Application.InchesToPoints(1)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = -3
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
.PrintErrors = xlPrintErrorsDisplayed
End With
End Sub


Thanks,

Greg


-----Original Message-----
I have a workbook with about 20 tabs and would like them

all to print
out one page tall, one page wide on 11 x 17 paper. I can

highlight all
tabs and change the setting to 11 x 17, but if I access

the file on
another computer with a different printer, it resets the
configuration.

Is there a way to push a command button that changes the

print size to
11 x 17 and prints the page on the default printer? Need

help with the
code!


---
Message posted from http://www.ExcelForum.com/

.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Setting Print Size for varying Printer use

Ok, I think I understand. Let me give it a shot.


Thank you both

--
Message posted from http://www.ExcelForum.com



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Setting Print Size for varying Printer use

I posted this under "ThisWorkbook" and it to test it changed the paper
size to legal. When I printed the document, it was not reset to 11 x
17.

I did something wrong. !


---
Message posted from http://www.ExcelForum.com/

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Setting Print Size for varying Printer use

I will assume you didn't do what I said. You didn't record a macro where
you actually selected 11 x 17 as the paper size, then used the recorded
value in your macro.

--
Regards,
Tom Ogilvy

"sowetoddid " wrote in message
...
I posted this under "ThisWorkbook" and it to test it changed the paper
size to legal. When I printed the document, it was not reset to 11 x
17.

I did something wrong. !


---
Message posted from http://www.ExcelForum.com/



Reply
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
members on my network printer not able to print to default printer smeheut Excel Discussion (Misc queries) 0 June 18th 07 06:42 PM
Default printer setting John Excel Discussion (Misc queries) 1 March 22nd 07 03:20 PM
Printer Multiple Worksheets with a particular Printer Setting PP[_2_] Excel Worksheet Functions 0 March 14th 07 02:02 PM
Macro: how to set a print area of varying size? Dave D Excel Discussion (Misc queries) 1 September 19th 06 12:50 PM
Setting printer paper smi Excel Programming 3 October 19th 03 08:59 PM


All times are GMT +1. The time now is 08:38 PM.

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

About Us

"It's about Microsoft Excel"