Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-02-2014, 03:14 PM
Gerhard Gerhard is offline Content created date Windows 8 Content created date Office 2013
Novice
Content created date
 
Join Date: Nov 2014
Posts: 2
Gerhard is on a distinguished road
Default Content created date

Hello,



I need some help to get the content created date including the seconds on excel files. I use Windows 8.1 and Office 2013.

Best Regards,
Gerhard
Reply With Quote
  #2  
Old 11-02-2014, 11:03 PM
Gerhard Gerhard is offline Content created date Windows 8 Content created date Office 2013
Novice
Content created date
 
Join Date: Nov 2014
Posts: 2
Gerhard is on a distinguished road
Default

Thanks got it properties, statistics.
Reply With Quote
  #3  
Old 11-02-2014, 11:26 PM
macropod's Avatar
macropod macropod is offline Content created date Windows 7 64bit Content created date Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You could use a macro like the following from any Office application:
Code:
Sub GetFileStats()
Application.ScreenUpdating = False
Dim FSO As Object, oItem As Object, StrDtTm As String
Dim strPath As String, strFile As String, strFullName As String, strData As String
strPath = GetFolder
If strPath = "" Then Exit Sub
strPath = strPath & "\"
strData = "File Stats For" & vbTab & strPath
If FSO Is Nothing Then Set FSO = CreateObject("Scripting.FileSystemObject")
strFile = Dir(strPath & "*.xls", vbNormal)
While strFile <> ""
  strFullName = strPath & strFile
  Set oItem = FSO.GetFile(strFullName)
  strData = strData & vbCrLf & vbCrLf & "Filename:" & vbTab & strFile & vbCrLf & _
    "Date Created: " & vbTab & Format(oItem.DateCreated, "DD/MMM/YYYY @ hh:mm:ss") & vbCrLf & _
    "Date Last Modified: " & vbTab & Format(oItem.DateLastModified, "DD/MMM/YYYY @ hh:mm:ss")
  strFile = Dir()
Wend
Open strPath & "FileStats.txt" For Output As #1
Print #1, strData
Close #1
Application.ScreenUpdating = True
End Sub
Function GetFolder() As String
Dim oFolder As Object
GetFolder = ""
Set oFolder = CreateObject("Shell.Application").BrowseForFolder(0, "Choose a folder", 0)
If (Not oFolder Is Nothing) Then GetFolder = oFolder.Items.Item.Path
Set oFolder = Nothing
End Function
The output is sent to the folder concerned.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Content created date Excel found unreadable content in file.xls. Do you want to recover the content of this workbook? Sanfran Excel 2 10-21-2014 12:09 AM
Excel pivot table with a DATE value field for some reason stops at a certain date angie450 Excel Programming 2 08-19-2014 08:50 AM
Content created date Multiple Userforms Displaying Different Content but Returning Same Content? marksm33 Word VBA 1 02-24-2014 06:17 PM
Content created date macro for change content of cell2 when content of cell1 changes Intruder Excel Programming 1 11-17-2012 08:24 PM
Package for CD with links to Windows media player content and Flash Shockwave content hectorh PowerPoint 4 10-15-2009 12:22 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:40 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft