Workbook Last Write Date Time

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

In the Workbook_Open() event handler I want to check the last write date time of the workbook. But I always get the current date time. I suspect this event handler occurs after the workbok has been opened. Any idea to get the last write date time of a workbook when opening it

Thank

Yong
 
Hi Yong

Try
ThisWorkbook.BuiltinDocumentProperties("Last Save Time")

HTH. Best wishes Harald

Yong said:
Hi

In the Workbook_Open() event handler I want to check the last write date
time of the workbook. But I always get the current date time. I suspect this
event handler occurs after the workbok has been opened. Any idea to get the
last write date time of a workbook when opening it?
 
Thanks a lot, Harald

C# version is

Microsoft.Office.Core.DocumentProperty prp;
Microsoft.Office.Core.DocumentProperties prps;

prps = (Office.DocumentProperties)Wb.BuiltinDocumentProperties
prp = prps["Last Save Time"]
DateTime workbookDT = (DateTime)prp.Value

Yong
 
Back
Top