Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I am new to macros and would like to create a macro that formats the header
and footer to include the name of the worksheet, my name, the date printed, number of pages and the path of the filename. I have come up with the following macro but when I run it, long file locations overwrite other info on the footer. How can I format my macro to write the file address on the 'bottom' line of my footer, well below my other footer information. Sub AppliesFormattingToSheet() ' ' AppliesFormattingToSheet Macro ' Macro recorded 5/25/2006 by xxxx' ' Keyboard Shortcut: Ctrl+z ' With ActiveSheet.PageSetup .PrintTitleRows = "" .PrintTitleColumns = "" End With ActiveSheet.PageSetup.PrintArea = "" With ActiveSheet.PageSetup .LeftHeader = "" .CenterHeader = "&""MS Sans Serif,Bold""&16&A" .RightHeader = "" .LeftFooter = "&9Created By: John XXXXX" & Chr(10) & "Printed On: &D" .CenterFooter = ActiveWorkbook.FullName .RightFooter = "&9Page: &P" .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 .PrintQuality = 600 .CenterHorizontally = False .CenterVertically = False .Orientation = xlPortrait .Draft = False .PaperSize = xlPaperLetter .FirstPageNumber = xlAutomatic .Order = xlDownThenOver .BlackAndWhite = False .Zoom = 100 End With End Sub Regards, macronewfie |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Probelm opening an excel 2000 file in excel 2003 | Excel Discussion (Misc queries) | |||
Macro created in Excel 2000 SR1 won't run with SP3 | Excel Discussion (Misc queries) | |||
Urgent Help Required on Excel Macro Problem | Excel Discussion (Misc queries) | |||
Excel updating from XML file - file path specific? | Excel Discussion (Misc queries) | |||
Hyperlink in Excel 2000 can't open bookmarked Word 2000 file | Excel Discussion (Misc queries) |