Below is my current macro, which is working great, but I would like to add in Cells(r, 10) the owner of the file. How can such a thing be accomplished? I can't find the command to use like File.Owner or something.
Sub DoFolder(Folder)
If Ans = vbNo Then GoTo NoSub 'Switching according to ans.
Dim SubFolder
For Each SubFolder In Folder.SubFolders
DoFolder SubFolder
Next
NoSub:
Dim File
For Each File In Folder.Files
FName = File.Name
If InStrRev(FName, ".") = 0 Then GoTo NextFile 'If "." not found then go to next file
Cells(r, 1) = Left(FName, InStrRev(FName, ".") - 1) 'File Name
ActiveSheet.Hyperlinks.Add Anchor:=Cells(r, 2), _
Address:=File.Path, _
TextToDisplay:=File.Path 'Hyperlinking Path
Cells(r, 3) = File.DateLastModified 'Date Last Modified
Cells(r, 4) = Round(File.Size / 1024, 3) 'in KBs Rounded to 3 Decimal places
Cells(r, 5) = Right(FName, Len(FName) - InStrRev(FName, ".") + 1) 'File Extension
r = r + 1
NextFile:
Next
End Sub
You can access the file's security properties (one of which is the Owner), through the Security Utility object.