Filename in Header or Footer

  • Thread starter Thread starter Ed
  • Start date Start date
E

Ed

Is there a way to place the filename in the headers or footer of an excel
printout?

Please reply to (e-mail address removed)_REMOVE_THIS_TEXT

Thanks

Ed Leaders
 
Did you even try?

From the File Menu | View | Headers and Footers
Click Custom Header or Footer whichever you prefer.
Decide whether you want it in the center left or right of header or footer
and click inside that square.
Click the icon next to the folder. Looks like a piece of paper with the
Excel logo on it.

If that doesn't work, I don't know.
 
Ed

That would depend upon which version of Excel you are running.

2002 and 2003 have the option as Micah points out.

If running an earlier version you need a macro to do it.

Sub PathInFooter()
ActiveSheet.PageSetup.RightFooter = ActiveWorkbook.FullName & " " & _
ActiveSheet.Name & " " & Application.UserName & " " & Date
End Sub

Edit out what you don't want from the above code.


Gord Dibben Excel MVP
 
I think we're talking about two somewhat different things here. The ability
to put a &[File] code in a header or footer for the workbook name has been
around at least as far back as XL97. It is done with a button when in Custom
Header or Footer, and gives the workbook name, without the path. That's
what Micah is talking about. The &[Path]&[File] code button was added
later, in 2002. That's what Gord is referring to. Getting the path part
required code in the earlier versions.

Ed, the OP, didn't mention the path part; he asked about getting the file
name in the header or footer.
 
Back
Top