file property

  • Thread starter Thread starter 71marco71
  • Start date Start date
7

71marco71

Dear friends
I would like to know the date of last access to my xls files present i
my directory C
Is it possible with a VBA code
 
Hi,

For this you can use dsofile.dll
Remember to register it.

In your VBA

Dim oFilePropReader As DSOleFile.PropertyReader
Dim oDocProp As DSOleFile.DocumentProperties

Sub FileInfo(ByVal strPath As String)
Set oFilePropReader = New DSOleFile.PropertyReader
Set oDocProp = oFilePropReader.GetDocumentProperties(strPath)
' Same examples
Debug.Print oDocProp.DateCreated
Debug.Print oDocProp.TotalEditTime
Debug.Print oDocProp.DateLastPrinted
Debug.Print oDocProp.DateLastSaved
End Sub

Wouter HM
 
I don't want to know the date of last saved but the date of the las
opened. for example, if yesterday I did a copy of the file "report.xls
(only a copy), how can i see today the date of that operation?
thank you very muc
 
Back
Top