Jul74ien74
XLDnaute Nouveau
Bonjour,
je souhaite via ma macro récupérer l'info qui est dans les statistique proprietaire d'un fichier mais il me dit qu'il n'est pas générer or il l'est.
Sub AfficherInfoFichier()
FichierATester = [B2]
attributs = Array("Attributes", "DateCreated", "DateLastAccessed", "DateLastModified", "Drive", "Name", "ParentFolder", "Path", "ShortName", "ShortPath", "Size", "type", "owner")
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile(FichierATester)
Cells(1, 5).Value = f.Attributes
Cells(2, 5).Value = f.DateCreated
Cells(3, 5).Value = f.DateLastAccessed
Cells(4, 5).Value = f.DateLastModified
Cells(5, 5).Value = f.Drive
Cells(6, 5).Value = f.Name
Cells(7, 5).Value = f.ParentFolder
Cells(8, 5).Value = f.Path
Cells(9, 5).Value = f.ShortName
Cells(10, 5).Value = f.ShortPath
Cells(11, 5).Value = f.Size
Cells(12, 5).Value = f.Type
Cells(13, 5).Value = f.owner
For i = 0 To UBound(attributs)
Cells(i + 1, 1).Value = attributs(i)
Next
Columns("A:B").EntireColumn.AutoFit
End Sub
une idée?
on m'a parler du DSO mais je ne connais pas
je souhaite via ma macro récupérer l'info qui est dans les statistique proprietaire d'un fichier mais il me dit qu'il n'est pas générer or il l'est.
Sub AfficherInfoFichier()
FichierATester = [B2]
attributs = Array("Attributes", "DateCreated", "DateLastAccessed", "DateLastModified", "Drive", "Name", "ParentFolder", "Path", "ShortName", "ShortPath", "Size", "type", "owner")
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile(FichierATester)
Cells(1, 5).Value = f.Attributes
Cells(2, 5).Value = f.DateCreated
Cells(3, 5).Value = f.DateLastAccessed
Cells(4, 5).Value = f.DateLastModified
Cells(5, 5).Value = f.Drive
Cells(6, 5).Value = f.Name
Cells(7, 5).Value = f.ParentFolder
Cells(8, 5).Value = f.Path
Cells(9, 5).Value = f.ShortName
Cells(10, 5).Value = f.ShortPath
Cells(11, 5).Value = f.Size
Cells(12, 5).Value = f.Type
Cells(13, 5).Value = f.owner
For i = 0 To UBound(attributs)
Cells(i + 1, 1).Value = attributs(i)
Next
Columns("A:B").EntireColumn.AutoFit
End Sub
une idée?
on m'a parler du DSO mais je ne connais pas