View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Print Directory to Excel

Owner is the computer name/owner.

What you want is the "Author" of the workbook and would not be the "last
saved by".

To see the "author" choose that from the dropdown list of available options
in Windows Explorer.

To return author to a cell use this code.

Sub author()
ActiveSheet.Range("A1").Value = _
ThisWorkbook.BuiltinDocumentProperties("Author")
End Sub


Gord Dibben MS Excel MVP

On Mon, 29 Sep 2008 12:35:07 -0700, 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

On Sep 29, 2:10 pm, Melody wrote:
Yes, I mean the owner of the file/folder. I can't use the add-in because it
runs a .exe file and at work our pc's are set up to not allow us to install
programs. Sometimes it works sometimes it doesn't. I guess it depends on
how the program is set up to run.

Anyway, just as you can see in the code that the path, filename, last
saved, etc is displayed, I also wan to display the owner of the file/folder.
I don't know VBA enough to know what the value for that setting might be or
where to exactly put it in this code.



"JP" wrote:
Do you mean the Owner of the folder? That sounds like an API thing. Or
maybe the Windows Script Host or FileSystemObject.

But I'm confused. If you can use the code in your original post, why
can't you use Chip's add-in? They're both VBA code. I must be missing
something here.