Betsy Byrne
New Member
Hello,
I recorded a print settings macro that i had used (successfully for years) on a previous machine. It is not working properly; specifically, it will fit all columns on one page, but it is not adding the headers and footers I want...
which are:
Header: FileName (carriage return) SheetName {all in Arial bold 14}
left footer "E.Byrne | FileName&Path"
right footer "Page / Pages"
Thanks!
~E.Byrne
I recorded a print settings macro that i had used (successfully for years) on a previous machine. It is not working properly; specifically, it will fit all columns on one page, but it is not adding the headers and footers I want...
which are:
Header: FileName (carriage return) SheetName {all in Arial bold 14}
left footer "E.Byrne | FileName&Path"
right footer "Page / Pages"
Code:
Sub PrintFormat()
'
' PrintFormat Macro
'
' Keyboard Shortcut: Ctrl+Shift+P
'
Application.PrintCommunication = False
With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$1"
.PrintTitleColumns = ""
End With
Application.PrintCommunication = True
ActiveSheet.PageSetup.PrintArea = ""
Application.PrintCommunication = False
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = "&""Arial,Bold""&14&F" & Chr(10) & "&A"
.RightHeader = ""
.LeftFooter = "E.Byrne | &Z&F"
.CenterFooter = ""
.RightFooter = "&P / &N"
.LeftMargin = Application.InchesToPoints(0.2)
.RightMargin = Application.InchesToPoints(0.2)
.TopMargin = Application.InchesToPoints(0.75)
.BottomMargin = Application.InchesToPoints(0.75)
.HeaderMargin = Application.InchesToPoints(0.3)
.FooterMargin = Application.InchesToPoints(0.3)
.PrintHeadings = False
.PrintGridlines = True
.PrintComments = xlPrintSheetEnd
.PrintQuality = 1200
.CenterHorizontally = True
.CenterVertically = False
.Orientation = xlLandscape
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = False
.PrintErrors = xlPrintErrorsDisplayed
.OddAndEvenPagesHeaderFooter = False
.DifferentFirstPageHeaderFooter = False
.ScaleWithDocHeaderFooter = True
.AlignMarginsHeaderFooter = True
.EvenPage.LeftHeader.Text = ""
.EvenPage.CenterHeader.Text = ""
.EvenPage.RightHeader.Text = ""
.EvenPage.LeftFooter.Text = ""
.EvenPage.CenterFooter.Text = ""
.EvenPage.RightFooter.Text = ""
.FirstPage.LeftHeader.Text = ""
.FirstPage.CenterHeader.Text = ""
.FirstPage.RightHeader.Text = ""
.FirstPage.LeftFooter.Text = ""
.FirstPage.CenterFooter.Text = ""
.FirstPage.RightFooter.Text = ""
End With
Application.PrintCommunication = True
End Sub
Thanks!
~E.Byrne