View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
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/

.