Fit to page
I have a print macro which I am having difficulty forcing it to fit to the
printed page when printing.
It insists on using two pages if it is a wide print area. The procedure I
have seems very simple and works fine in all areas except this.
Sub OSect12Pr()
ActiveSheet.PageSetup.PrintArea = ""
ActiveSheet.PageSetup.PrintArea = "$AU$2:$BI$27"
With ActiveSheet.PageSetup
.LeftMargin = Application.InchesToPoints(0.15748031496063)
.RightMargin = Application.InchesToPoints(0.15748031496063)
.TopMargin = Application.InchesToPoints(0.393700787401575)
.BottomMargin = Application.InchesToPoints(0.393700787401575)
.HeaderMargin = Application.InchesToPoints(0.511811023622047)
.FooterMargin = Application.InchesToPoints(0.511811023622047)
.Orientation = xlLandscape
.Draft = False
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Preview:=False,
Collate:= _
True
End Sub
I have run the procedure using the macro recorder to see where I was goig
wrong but I still ge problems. There are a whole range of worksheets in
workbook abd each sheet will have its own print area and will be printed
from the active sheet. I would welcome any help.
Kind Regards
Graham Haughs
Turriff, Scotland.
|