I have the following macro to insert the path\filename\sheet into all sheets in a workbook. I would like to be able to automatically run the code whenever I save or print any active workbook. Can anyone help please?
Sub PathinFooter()
Dim WS_Count As Integer
Dim I As Integer
WS_Count = ActiveWorkbook.Worksheets.Count
For I = 1 To WS_Count
Sheets(I).Select
With ActiveSheet.PageSetup
.RightFooter = "&6&Z&F\&F\&A"
End With
Next I
Sheets(1).Select
End Sub
Sub PathinFooter()
Dim WS_Count As Integer
Dim I As Integer
WS_Count = ActiveWorkbook.Worksheets.Count
For I = 1 To WS_Count
Sheets(I).Select
With ActiveSheet.PageSetup
.RightFooter = "&6&Z&F\&F\&A"
End With
Next I
Sheets(1).Select
End Sub