LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
macronewfie
 
Posts: n/a
Default Macro help: File path in Excel 2000

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Probelm opening an excel 2000 file in excel 2003 Mark Excel Discussion (Misc queries) 1 February 13th 06 07:47 AM
Macro created in Excel 2000 SR1 won't run with SP3 NB Excel Discussion (Misc queries) 2 January 18th 06 01:37 PM
Urgent Help Required on Excel Macro Problem Sachin Shah Excel Discussion (Misc queries) 1 August 17th 05 06:26 AM
Excel updating from XML file - file path specific? Sean Excel Discussion (Misc queries) 4 August 5th 05 12:56 PM
Hyperlink in Excel 2000 can't open bookmarked Word 2000 file DCheslock Excel Discussion (Misc queries) 1 May 5th 05 10:46 PM


All times are GMT +1. The time now is 06:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"