When I use, ActiveWorkbook.BuiltinDocumentProperties
("Creation Date").Value, it throws up some errors. But
when I use on error resume next, it doesnt, for obvious
reason. Is it throwing errors because the creation date
is empty?. When I do the right click on the file name in
windows exploer, then properties, it does have creation
date. I am trying to accomplish these:
1. File Name, Path and Worksheet Name
2. Created by, Created On
3. Last Saved by, Last Saved On
4. Printed by, Printed On.
Following is the piece of VBA code I used:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
'On Error Resume Next
With ActiveSheet.PageSetup
.LeftFooter = "&8" & _
LCase(ActiveWorkbook.FullName) & "; Worksheet:"
& " &A " & vbLf & _
"Created by " &
ActiveWorkbook.BuiltinDocumentProperties("Author") & "
on " & ActiveWorkbook.BuiltinDocumentProperties("Creation
Date").Value & vbLf & _
"Last Saved by " &
ActiveWorkbook.BuiltinDocumentProperties("Last Author")
& " on " & Format(ActiveWorkbook.BuiltinDocumentProperties
("Last Save Time"), "dddd dd mmm yyyy, hh:mm AM/PM") &
vbLf & _
"Printed by " & Application.UserName & " on " &
Format(Now(), "dddd dd mmm yyyy, hh:mm AM/PM")
.RightFooter = "&8" & "Page &P of &N"
End With
'On Error GoTo 0
End Sub
All of the part is working fine except for the Create
Date.
Please help.
Thanks