RobbieC
Active Member
- Joined
- Dec 14, 2016
- Messages
- 376
- Office Version
- 2010
- Platform
- Windows
Hi there, I have a workbook and each sheet has a different range set as the print area. Some are bigger than others but on the whole they are all pretty similar.
I'd like to be able to set each page's print setup so that each 'print area' range fits to the width of the print paper (or PDF width)
This works for me:
but only if the print area is BIGGER than the width of A4. It doesn't seem to 'scale up' if the range is smaller...
Can you help me out to scale the print area up to the width of the A4 print area?
Thanks very much
I'd like to be able to set each page's print setup so that each 'print area' range fits to the width of the print paper (or PDF width)
This works for me:
Code:
With ActiveSheet.PageSetup
.PaperSize = xlPaperA4
.Orientation = xlPortrait
.LeftMargin = Application.CentimetersToPoints(0)
.RightMargin = Application.CentimetersToPoints(0)
.TopMargin = Application.CentimetersToPoints(0)
.BottomMargin = Application.CentimetersToPoints(0)
.HeaderMargin = Application.CentimetersToPoints(0)
.FooterMargin = Application.CentimetersToPoints(0)
.CenterHorizontally = True
.CenterVertically = False
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = False
End With
but only if the print area is BIGGER than the width of A4. It doesn't seem to 'scale up' if the range is smaller...
Can you help me out to scale the print area up to the width of the A4 print area?
Thanks very much