Results 1 to 2 of 2

Thread: I Have Macro to Populate List of Files (Need help with Populating Thumbnails)?
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular
    Join Date
    Aug 2005
    Post Thanks / Like
    0 Post(s)
    0 Thread(s)

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

    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.

    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()
    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

  2. #2
    Board Regular Stridhan's Avatar
    Join Date
    Mar 2014
    Post Thanks / Like
    0 Post(s)
    0 Thread(s)

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

    One way to add pictures as comments.
    watch mrexcel himself
    Learning by doing
    Most of the times I dont have the answere, I trial and error to help you out.
    My reward is knowledge!

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts