Sub GetProps()
On Error Resume Next
MsgBox ActiveWorkbook.BuiltinDocumentProperties.Item("Aut hor")
if err.Number < 0 then
msgbox "Author Not Available"
err.clear
end if
MsgBox ActiveWorkbook.BuiltinDocumentProperties.Item("Las t Save Time")
if err.Number < 0 then
msgbox "Last Save Time not Available"
err.clear
end if
On Error goto 0
End Sub
--
Regards,
Tom Ogilvy
"CLR" wrote:
Hi All........
I am trying to use this code but on some files I get a VB error on the "Last
Save Time" line........how may I cause a return of "Not available" instead of
the VB error?
Sub GetProps()
MsgBox ActiveWorkbook.BuiltinDocumentProperties.Item("Aut hor")
MsgBox ActiveWorkbook.BuiltinDocumentProperties.Item("Las t Save Time")
End Sub