MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Displaying full paths in custom footers


Posted by Angela on December 11, 2001 9:15 AM

I have been asked to create an excel template where there is a custom footer that displays the full path name. For example, I know that in custom footers I can show the file name, ie, Book1.xls. Is there any way to customize it so that it shows, for example c://windows/desktop/Book1.xls in the footer when I print it?


Posted by Ed on December 11, 2001 10:46 AM

Angela,

Here is a macro that will add the path to the right footer. You can adjust it to go into the center or left side of the footer.

Sub FullNameInRightFooter()

ActiveSheet.PageSetup.RightFooter = ActiveWorkbook.FullName

End Sub

Ed

Posted by Ed on December 11, 2001 12:27 PM

Heres another that will add the complete path prior to printing

Angela,

Private Sub Workbook_BeforePrint(Cancel As Boolean)

ActiveSheet.PageSetup.LeftFooter = ActiveWorkbook.FullName

End Sub

Ed