Here's our Microsoft Office Tip for.. June 18, 2001
Click Here to see a complete list of all of our previously released Tips!
More on Headers and Footers
A short while ago, we showed you a macro that prints the workbook's name in the file's footer. You might be wondering if there's a way to print the filename in one of the other footers or even a header. For instance, what if you want to print the name in the center of the footer or in the right portion of the header?

Fortunately, the solution is simple. First, let's review the original macro:

Sub NameInFooter()
ActiveSheet.PageSetup.LeftFooter = ActiveWorkbook.FullName
End sub

Now, to change the location of the file's name, simply replace the LeftFooter property with one of the following properties:

- CenterFooter
- RightFooter
- LeftHeader
- CenterHeader
- RightHeader