Folder name in footer

P

Paul N

How do I get the folder(s) name(s) into the footer of my
Excel'97 Book.xlt template?
 
B

Bob Phillips

Paul,

reprint.

This code, placed in the ThisWorkbook code module, automatically sets the
full name when printing.

Private Sub Workbook_BeforePrint(Cancel As Boolean)
ActiveSheet.PageSetup.LeftFooter = ThisWorkbook.FullName
End Sub


If you just want the path, change FullName to Path.


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
F

Frank Kabel

hi Paul
try
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
For Each wkSht In ActiveWindow.SelectedSheets
With wkSht.PageSetup
.LeftFooter = ThisWorkbook.FullName
End With
Next wkSht
End Sub

HTH
Frank
 
Top