My work requires monotonous and somewhat time consuming input of headers and footers (h and f). I currently have a macro set up to automate these h and f with both static and non-static information (as seen in the code). What I wondering is if there is a way to allow user input for those items that need to change (e.g. company name, title of paper, reference (X-X-1), etc.) or if there is a better way to do this.
Sub header_tb()
Application.PrintCommunication = False
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
Application.PrintCommunication = True
ActiveSheet.PageSetup.PrintArea = ""
Application.PrintCommunication = False
With ActiveSheet.PageSetup
.LeftHeader = _
"&""Times New Roman,Bold""Company Name" & Chr(10) & "December 31, 2015&""Times New Roman,Regular""" & Chr(10) & "NNN: &D"
.CenterHeader = ""
.RightHeader = _
"&""Times New Roman,Bold""Work Paper Name&""Times New Roman,Regular""" & Chr(10) & "p. &P/&N"
.LeftFooter = "&9File: &F"
.CenterFooter = ""
.RightFooter = "&""Times New Roman,Bold""X-X-1"
.LeftMargin = Application.InchesToPoints(0.9)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(1.2)
.BottomMargin = Application.InchesToPoints(0.5)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.3)
.PrintHeadings = False
.PrintGridlines = True
.PrintComments = False
.PrintQuality = 600
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
.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
Bookmarks