Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
macro for footer
on each excel document that i print, i would like to include the date, the
file name, and the path. i saw a solution to this but the solution pertained only to new documents. how do i set up a macro in an existing document that automatically prints that info? thanks for your help -- aprilshowers |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
macro for footer
This code should do what you need. Right click the XL icon in the upper left
hand corner of the XL window and select View code. This will take you to the VBE. Paste the following... Private Sub Workbook_BeforePrint(Cancel As Boolean) Dim wks As Worksheet For Each wks In ActiveWindow.SelectedSheets With wks.PageSetup .LeftFooter = ThisWorkbook.Path & "\" & ThisWorkbook.Name .RightFooter = Date End With Next wks End Sub -- HTH... Jim Thomlinson "april" wrote: on each excel document that i print, i would like to include the date, the file name, and the path. i saw a solution to this but the solution pertained only to new documents. how do i set up a macro in an existing document that automatically prints that info? thanks for your help -- aprilshowers |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Automatic update of footer macro | Excel Worksheet Functions | |||
Add Font to Header/Footer macro | Excel Discussion (Misc queries) | |||
Footer Macro | Excel Discussion (Misc queries) | |||
Header and Footer Macro | Excel Discussion (Misc queries) | |||
Footer Macro? | Excel Discussion (Misc queries) |