Document Properties and Custom Fields

A

Andrew

Hi ,
Is it possible to insert a reference to document
properties or custom fields (defined under custom
properties) into a excel footer?

Thanks
Andrew
 
D

Dave Peterson

You could use a macro to retrieve it:

Option Explicit
Sub testme01()

With ActiveSheet.PageSetup
.CenterFooter = "&8 " & _
FormatDateTime((ActiveWorkbook _
.BuiltinDocumentProperties("Last Save Time")), 1)

.RightFooter = "&8 " & _
ActiveWorkbook.CustomDocumentProperties("mycustomprop")

End With

End Sub

Be aware that not all builtinproperties are kept in excel and there are some
differences between versions of excel. ("last save time" was first kept in
xl2k, if I recall correctly.)
 
Top