Changing footer w/ macro


Posted by Dwight on March 21, 2001 12:58 PM

Wrote a macro to change existing footer (this would be for spreadsheets I didn't create) to one which has fullname/path on left, nothing in center, page/date on right, all in 8 point TNR font. Works fine except I can't figure whre to put the "&8" for the left section to get the font size to 8 point.

Can someone help?



Posted by tom venn on March 21, 2001 4:45 PM

open up a new work book, run the macro below to see that it works. i ran it and it worked ok for me. all i did was point and click the page set-up, then custom footer to get this.

i think this is the line of code you are interested in ------ .LeftFooter = "&8eight points"

cheers,

thomas

Sub Macro1()

With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = "&8eight points"
.CenterFooter = "ten points"
.RightFooter = "&12twelve points"
.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
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
End With
End Sub