Excel document properties insert into a cell

G

Guest

I would like to find a way to insert the data that is stored on the
"Properties" page of an excel document into the cell. In work and Visio I can
do it easily but I can't figure out how to do it in Excel. I know, it's
probably simple, but I just can't think that simple right now...

thanks
mark
 
B

Bob Phillips

Mark,

You will need a 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 such as
=DocProps ("last author")
or
=DocProps ("last save time")



--

HTH

RP
(remove nothere from the email address if mailing direct)
 
F

Frank Kabel

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 for example in a cell (to get the last modification date)
=DOCPROPS("last save time")
(format cell as date)
 
G

Guest

Man, not I fell really stupid. I have not used VB in Excel in a while and
totaly forgot about it.

Thanks.

Mark
 

Ask a Question

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.

Ask a Question

Top