Author of Excel workbook appear in footer

  • Thread starter Thread starter Randy W
  • Start date Start date
R

Randy W

Is there a way/code to have the author of the excel file
appear automatically in the custom header/footer of an
Excel 97 file. Maybe some type of code. Any help would
be greatly appreciated.

Thank you.
 
Try this

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
For Each wkSht In ActiveWindow.SelectedSheets
wkSht.PageSetup.RightFooter = ActiveWorkbook.BuiltinDocumentProperties("Author")
Next wkSht
End Sub

You must place it in the Thisworkbook module
When you print it will add the name in the footer

Right click on the Excel icon next to File in the menubar
choose view code
paste it in there
Alt-Q to go back to Excel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top