Insert File Properties

  • Thread starter Thread starter JB
  • Start date Start date
J

JB

Is it possible to insert a file property (e.g. Title,
Subject, Author) into an Excel worksheet cell for display,
similar to inserting a field in Word? Thus the value could
be centrally managed yet appear multiple locations where
inserted throughout the document.
 
Hi
use the following UDF:

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

and enter in a cell
=DOCPROPS("last author")
or
=DOCPROPS("last save time")
 
Back
Top