ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Printing the page properties as header (https://www.excelbanter.com/excel-discussion-misc-queries/3169-printing-page-properties-header.html)

r_najafi

Printing the page properties as header
 
Is there any option to display the document properties in header or footer.
thanks

Bob Phillips

This prints the last saved time in the header.

Private Sub Workbook_BeforePrint(Cacel As Boolean)
With ActiveWorkbook
.ActiveSheet.PageSetup.LeftHeader = "Last saved on: " & _
Format(.BuiltinDocumentProperties("Last Save Time"), "dd mmm
yyyy")
End With
End Sub


goes in the ThisWorkbook code module

--

HTH

RP
(remove nothere from the email address if mailing direct)


"r_najafi" wrote in message
...
Is there any option to display the document properties in header or

footer.
thanks





All times are GMT +1. The time now is 09:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com