View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Alasdair Stirling[_3_] Alasdair Stirling[_3_] is offline
external usenet poster
 
Posts: 17
Default owner/author of a file

Use the workbooks BuiltinDocumentProperties as follows:

Sub alpha()
Range("a1").Activate
With ActiveCell
' date created
.Value = ThisWorkbook.BuiltinDocumentProperties.Item(11).Va lue
' date last saved
.Offset(1, 0).Value =
ThisWorkbook.BuiltinDocumentProperties.Item(12).Va lue
' author
.Offset(2, 0).Value =
ThisWorkbook.BuiltinDocumentProperties.Item(3).Val ue
End With
End Sub

There is no BuiltinDocument Property for Owner. There are two solutions to
this limitation. Either create a CustomDocumentProperty as follows:

ThisWorkbook.CustomDocumentProperties.Item("Owner" ).Value = "SomeName"

where "SomeName" is the name of the person owning the document. If you iuse
this method you recall the property as follows:

ThisWorkbook.CustomDocumentProperties.Item("Owner" ).Value

Alternativly, you might use another BuiltinDocumentProperty e.g. Manager.

You can enter all of these properties manually (via Excel's Properties
dialogue) or via VBA (See Chip Pearson's website for details of how to do
this with VBA).

Regards,

Alasdair Stirling


"Dennis Hancy" wrote:

I need to produce a listing of files along with date created, date
modified, owner, and author. I am using the file properties
dateCreated and dateLastmodified for the first two.

Are there similar properties to get the owner and the author?

If not, how else can I get this information?

Thanks.


Dennis Hancy
Eaton Corporation
Cleveland, OH