copy the image attributes eg. size, type, dimensions to excel cells without copying image itself to excel just fetching its details from a folder that contains a lot of images??
Thanks
copy the image attributes eg. size, type, dimensions to excel cells without copying image itself to excel just fetching its details from a folder that contains a lot of images??
Thanks
any luck with this in the last 2 years? I am struggling as well
Hello AloraRando22,
Welcome to the Forum!
This macro will list all of a file's information. It will prompt you to choose a file and then list all of the file's details that are available in the Window's system for your computer on the ActiveSheet.
NOTE: Be sure the ActiveSheet is a blank sheet in your workbook before running this macro!
![]()
Sub ListFileInfo() ' Written: July21, 2014 ' Author: Leith Ross ' Summary: List all Windows information about a file ' on the Active Sheet in Columns A:E starting ' at row 1. Dim FileName As String Dim FolderPath As Variant ' This must be a Variant! Dim oFile As Object Dim oFolder As Object Dim oShell As Object Dim Path As Variant Dim Rng As Range Path = Application.GetOpenFilename("All Files (*.*),*.*") If Path = "" Then Exit Sub Path = Split(Path, "\") FileName = Path(UBound(Path)) ReDim Preserve Path(UBound(Path) - 1) FolderPath = Join(Path, "\") Set oShell = CreateObject("Shell.Application") Set oFolder = oShell.Namespace(FolderPath) Set oFile = oFolder.ParseName(FileName) Set Rng = Range("A1") For i = 0 To 300 ' List the index value and it's description. Rng.Offset(i, 0).Resize(1, 2).Value = Array(i, oFolder.GetDetailsOf(Nothing, i)) ' List the file's information for this index value. Rng.Offset(i, 4).Value = oFolder.GetDetailsOf(oFile, i) Next i End Sub
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
Thank you very much! this works perfectly![]()
Hello AloraRando22,
You're welcome.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks