If you want the Author of the file/workbook change the 8 to 9
Cells(NextRow, 2).Value = fl.getdetailsof(f, 9)
Gord
On Mon, 29 Sep 2008 13:57:06 -0700 (PDT), JP wrote:
Thank you. Here's some sample code that will give you the Owner
property of the files in a folder. This routine simply prints the
filename and owner into a worksheet, do you need help integrating it
into your existing code?
Sub GetOwner()
Dim f As Object
Dim sh As Object
Dim fl As Object
Dim NextRow As Long
Set sh = CreateObject("Shell.Application")
Set fl = sh.Namespace("C:\My Files\")
NextRow = WorksheetFunction.CountA(Range("A:A")) + 1
For Each f In fl.Items
Cells(NextRow, 1).Value = f.Name
Cells(NextRow, 2).Value = fl.getdetailsof(f, 8)
NextRow = NextRow + 1
Next f
End Sub
(Based on http://classicasp.aspfaq.com/files/d...of-a-file.html)
--JP
On Sep 29, 3:35*pm, Melody wrote:
Open Windows explorer (2003), if you right click on the column headings
you'll see a list of available options. *One of those is Owner. *My guess is
that's the same as Last Saved by.
"JP" wrote:
Sorry, let me go back one step. Are you able to view this information
manually? If so, where specifically do you see it?
I don't recall there being an "owner" property of a folder or file,
only a "created by" or "last saved by" property. How would it be
determined or enforced?
--JP