Set Reg = New Regexp : Reg.IgnoreCase = True Reg.Pattern = "^(do[ct][xm]?|xl[st][xm]?|p[op]t[xm]?|vsd)$" If Reg.Test(Mid(FileName, InStrRev(FileName, ".") + 1)) Then Set Reg = Nothing Set File = CreateObject("Shell.Application").NameSpace(0).ParseName(FileName) For Each Ct in Array(_ "System.Document.CharacterCount",_ "System.Document.ClientID",_ "System.Document.Contributor",_ "System.Document.DateCreated",_ "System.Document.DateSaved",_ "System.Document.Division",_ "System.Document.DocumentID",_ "System.Document.LastAuthor",_ "System.Document.LineCount",_ "System.Document.MultimediaClipCount",_ "System.Document.NoteCount",_ "System.Document.PageCount",_ "System.Document.ParagraphCount",_ "System.Document.PresentationFormat",_ "System.Document.RevisionNumber",_ "System.Document.Security",_ "System.Document.SlideCount",_ "System.Document.Template",_ "System.Document.TotalEditingTime",_ "System.Document.Version",_ "System.Document.WordCount") If i = 18 Then Pt1 = "FTime(" : Pt2 = ")" Else Pt1 = "" : Pt2 = "" Execute "Content" & i & "=" & Pt1 & "File.ExtendedProperty(""" & Ct & """)" & Pt2 i = i + 1 Next : Set File = Nothing End If Function FTime(T) T = CSng(T)/10000000 If T < 32768 Then FTime = Right("0" & TimeSerial(0, 0, Int(T)), 8) Else D = Int(T/86400) : H1 = T - D * 86400 H = Int(H1/3600) : M1 = H1 - H * 3600 M = Int(M1/60) : S = M1 - M * 60 If D = 0 Then D = "" Else D = D & "d:" FTime = D & Right("0" & TimeSerial(H, M, S), 8) End If End Function |