Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Take the "last saved by"?

Status
Not open for further replies.

Fursten

Programmer
Dec 27, 2000
403
PT
Hi,

When I save an excell document and I go to see its properties (summary), I realize that the user and company with which the program is registered appears there. I can take everything except the "last saved by". How can I take it?


Thank you
 
Hi Silvio,

Thank you for your question. I never bothered to check it out so this is an excellent opportunity.

The following displays a message box with the "last saved by" entry, the next bit pops a list of all BuiltinDocumentProperties into the worksheet:

Sub test()

MsgBox ActiveWorkbook.BuiltinDocumentProperties("Last author")

rw = 1
Worksheets(1).Activate
For Each p In ActiveWorkbook.BuiltinDocumentProperties
Cells(rw, 1).Value = p.Name
rw = rw + 1
Next

End Sub

IS
 
HI,

What I would like to do, was to change it! However, that propertie is read only :(

Is there any way to change de "last changed"?

Sergio Oliveira
 
Hello Sergio,

The Last saved by/Last author seems to be the User Name(under Tools, Options) of the user who last saved the file.
This Office User Name can be changed. So, you could store the User Name in variable, change the User Name, save the file, set the User Name back to the name that you stored in the variable and close the file. Not an elegant solution ...

Sub test()
Dim oldlastauthor As String
Dim oldauthor As String
Dim newauthor As String

oldlastauthor = ActiveWorkbook.BuiltinDocumentProperties("Last author")
MsgBox oldlastauthor

oldauthor = Application.UserName
MsgBox oldauthor

newauthor = "New Name"

Application.UserName = newauthor
ActiveWorkbook.Save

MsgBox ActiveWorkbook.BuiltinDocumentProperties("Last author")

Application.UserName = oldauthor
ActiveWorkbook.Close

End Sub

It seems that besides this "superficial" and easily accessible information, Excel also stores stuff like last saved by in a different way ...

Ilse
 
Does anyone know of a way to get the "last saved date" of say Workbook A, into a cell in Workbook B or do you have to use VBA ?

Help !!!! I'm wasting days on this !!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top