I Have Macro to Populate List of Files (Need help with Populating Thumbnails)?

Mr. Walnuts

Board Regular
Joined
Aug 8, 2005
Messages
176
I've searched the archives, and haven't found anything... I hope its even possible.

I have a Video library on my server where I host Television shows and Movies that I stream to different systems throughout the house. I'm looking to use Excel to create a sort of Table of Contents sheet, listing the contents of my TV Show library and Movie Library.

I've found a few macros that will list the files in a specified directory folder, but I'm hoping to find out if there are any VBA code commands that can also populate the thumbnail for the video... OR.. if it cannot populate the native file thumbnail, possibly populate a thumbnail based on a corresponding .jpeg file (I don't currently have the .jpeg files... but if native thumbnails are out of the question, it would be simple enough to get and save .jpeg files to a folder with matching titles to correspond to the Movie/TV Show titles; if that is possible, I would guess it would involve an Index/Match or VBA equivalent).

Ok, so here's the Macro VBA code I'm using at the moment to populate the list; it currently populates the Title, The Date Created, and some form of Size measurement... but I don't really understand the size metric since many of the values are negative integer numbers.

Code:
Sub list()



Dim r As Integer, F As String, Directory As String
Directory = "E:\Movies\"
r = 1
Cells(r, 1) = "FileName"
Cells(r, 2) = "Size"
Cells(r, 3) = "Date/Time"
Range("A1:c1").Font.Bold = True
'Get Directory
F = Dir(Directory) ', 7)
Do While F <> ""
r = r + 1
Cells(r, 1) = F
Cells(r, 2) = FileLen(Directory & F)
Cells(r, 3) = FileDateTime(Directory & F)
'Get next File
F = Dir()
Loop

End Sub

All I really need.. is the Filename (Title)... and a Thumbnail. I don't need the Size value or the Date value... though I don't really know how to eliminate them, so I just ignore them or hide those columns.

If anyone knows a good way to populate the Title and Thumbnail... that would be amazing.
Actually, if anyone knows an efficient way to do either of these things, I'd be greatful.

I'm willing to write the code myself if anyone can point me to any literature that can explain some of the VBA command syntices... or any type of Excel VBA framework/structure for dummies.

I used to think I was pretty good at this stuff since I'm great with Functions/Formulas... but I dont really understand the the structure for how VBA scripts are designed & assembled.

Thank you for any help anyone can provide... even if its just a nudge in the right direction
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top