Function to access custom fields in Properties

  • Thread starter Thread starter Hall
  • Start date Start date
H

Hall

Is there a function that can retrieve the value of any particular custom
field in the file's Properties? Word has this but I can't find it in Excel.
 
Hall

Copy/paste this User Defined Function to a module in your workbook.

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

=DOCPROPS("last author")
or
=DOCPROPS("last save time")


Gord Dibben Excel MVP
 
Back
Top