Need to get last saved by of a file

Hi ,

how can I get user name who has modified the file last .
Thanks in advance

Hy, you can you the VBA code in the link bellow.

The idea of it is to search a specific folder, search for excel files, and return the last modied date and user.

If you need any help with the VBA please let me know

1 Like

Thanks William , Here requirement is not only to get the last saved for excel, there may be other type of file as well (pdf,docx etc),

As, I’m not good in VBA would appriciate your more inputs if you can !!

Hi, welcome to the community!
Lets say you are on your pc and looking at a file, can you tell this information? I dont think this is possible to do.

Hey! Please check out the FileMetaDataReader activity. It pulls out the file metadata of a file, one of which is the last saved time. It worked really well for me.

The library pulls the same info from a file that you would get if you right click on a file and select properties

In his case, he wants the person who modified the file and not the time, thats why i said i think it cannot be done… Windows just dont keep track of that…

1 Like

So this depends. If you are using a shared location, like SharePoint, you can access this.

If you want to access it via file metadata (same as last saved time) then you need to have auditing on the file enabled.

1 Like

Thanks Jacqui, I tried FileMetaData Reader activity but unfortunatly it is not giving “Last Saved by” name

and yes , File will be using on sahred location by multiple users

Hy,

in the code there is this line:

It checks if there is the string “.xls” in the file, it means, it is an excel file

If InStr(oFile.Name, ".xls") > 0 Then


You can edit it to all the files you want or remove it if you want the info for all the files

If InStr(oFile.Name, “.xls”) > 0 Or InStr(oFile.Name, “.pdf”) > 0 Then

Regards

The Last saved by is located in the Properties section. See below.
image

Hi, welcome to the community!
This is from the Office document and not from Windows… So it would not answer what this user wanted…