Hi
you may use the following function (put this in a standard module):
Function DocProps(prop As String)
application.volatile
On Error GoTo err_value
DocProps = ActiveWorkbook.BuiltinDocumentProperties (prop)
Exit Function
err_value:
DocProps = CVErr(xlErrValue)
End Function
Now add the following procedure in your workbook module (not in a
standard module)
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
For Each wkSht In Me.Worksheets
With wkSht.PageSetup
.LeftFooter = Format(DocProps("Creation date"),"MM/DD/YYYY")
.Centerfooter = Format(DocProps("last save
time"),"MM/DD/YYYY")
.RightFooter = DocProps("last author")
End With
Next wkSht
End Sub
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.