ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to access MS property "lastsavedby" for a file (https://www.excelbanter.com/excel-programming/309121-how-access-ms-property-lastsavedby-file.html)

jmoffat[_7_]

How to access MS property "lastsavedby" for a file
 
Does anyone know how to get the name of the user who last saved a fil
on a server using Excel VB ?

It may be someting along the lines of:

Dim fs, f1, fc
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder(folderspec)
Set fc = f.Files
nfiles = 0
For Each f1 In fc
nfiles = nfiles + 1
fnames(nfiles) = f1.Name
owner(nfiles) = f1.lastsavedby
Next

which of course does not work

--
Message posted from http://www.ExcelForum.com


Iain King

How to access MS property "lastsavedby" for a file
 

"jmoffat " wrote in message
...
Does anyone know how to get the name of the user who last saved a file
on a server using Excel VB ?



Use Workbook.BuiltinDocumentProperties - it has a Last Author item. You
can find how to access it in the help file.

.... unless you mean a non-excel file, in which case I don't think you can.

Iain King




All times are GMT +1. The time now is 04:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com