+ Reply to Thread
Results 1 to 8 of 8

Get all pictures from all sub folders to excel

  1. #1
    Registered User
    Join Date
    05-18-2020
    Location
    X
    MS-Off Ver
    2013
    Posts
    17

    Question Get all pictures from all sub folders to excel

    Hello there,
    My problem is I'm adding old model images from shared network to excel in my free times. When I need a similar model then it's easy to find it also saving some time. But here is a small problem. There is dozen of sub folders in the main folder. So with my macro I'm adding them 1 by 1. Is there a way to get them? The subfolders are everyday updating by personels so I also need to check the different folders at the opening of excel.

    This is what do I do to be a example.

    Thank you for helping from now!
    Attached Files Attached Files

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Get all pictures from all sub folders to excel

    so you're taking images from windows dirs and instering them into an excell sheet or book? is that it? and you want a way to loop all the dirs and subdirs in windows and simply pull all the images and and paste them in the workbook inside a loop?

    FYI - I did not look at your file.

  3. #3
    Registered User
    Join Date
    05-18-2020
    Location
    X
    MS-Off Ver
    2013
    Posts
    17

    Re: Get all pictures from all sub folders to excel

    if you look at my excel file i think you are going to understand what do i want to do. Yes, i wanna take all pictures in subdirs in the windows to the sheet in the order with their subdir names + pictures in the folders. Please check my uploaded file if you have time you're going to understand it easily.

  4. #4
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Get all pictures from all sub folders to excel

    sky,

    if no one else steps in here, I will get back to you. I've been sidetracked today. sorry

  5. #5
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Get all pictures from all sub folders to excel

    ok Sky,

    Is this what you want to do? Here is what I have done:
    => written code that loops the subdirs.
    => takes the images out of each subdir.
    => places those images in the appropriate places on the sheet, then resizing them to fit in the cells for which they are placed.
    => repeats the process for each sub dir and every picture you have in them.
    this what you're looking for?

    there was a lot of stuff that your code was doing that I didn't understand. I won't mention that in this post, however, the solution I have provided probably does what you want automatically. the resizing of the HEIGHT and WIDTH of each image you will have to change, because thhat code is only literal, hard coded in. I'm sure you can fix that yourself. It shouldn't be that tough. have a good night.
    Please Login or Register  to view this content.
    https://docs.microsoft.com/en-us/off...el.shape.width

    https://docs.microsoft.com/en-us/off...l.shape.height
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    05-18-2020
    Location
    X
    MS-Off Ver
    2013
    Posts
    17

    Re: Get all pictures from all sub folders to excel

    Hello Dear vba_php,
    Sorry my bad language. that's why u didnt understand me.
    Firstly I'm gratefull for your working and spending time for me,
    I'm new on the VBA, I'm still trying to learn some easy things. Probably I wouldnt do it myself.

    Okay a diffferent explaining; How can i take all pictures from a subfolder(subdir) into excel in a order with the Loop?
    But there is a small point; subdirs update everyday by staffs(adding new folders). so I need a button like RENEW the pictures or adding the last added pictures from the directory into excel.
    I guess It's more easier to do it. I can try editing myself rest of the codes.(I hope)


    Also I got an error here;

    Please Login or Register  to view this content.
    Last edited by SkyGod; 09-04-2020 at 03:44 AM.

  7. #7
    Registered User
    Join Date
    05-18-2020
    Location
    X
    MS-Off Ver
    2013
    Posts
    17

    Re: Get all pictures from all sub folders to excel

    OH wait, I've realized now, it works pretty well. just I need to write model numbers manuel to the A column. then it takes the picture from the folder. that way is also perfect too.
    The error source of what I got in previous message, there wasnt a folder name with the model number. I found it.

    Thank you so much vba_php you are awesome!

  8. #8
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Get all pictures from all sub folders to excel

    Quote Originally Posted by SkyGod View Post
    Thank you so much vba_php you are awesome!
    LOL. not really. yeah, but thanks. good luck with it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 01-19-2018, 09:17 AM
  2. macro to loop through all folders and sub folders of outlook and save to excel
    By excelhelpseeker in forum Outlook Formatting & Functions
    Replies: 0
    Last Post: 10-27-2016, 03:24 AM
  3. Create folders and sub folders from lists of data in excel
    By matthruba in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-30-2016, 11:28 AM
  4. Use Excel VBA to Copy multiple files from different source folders to different folders
    By mm1234mail in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-12-2014, 01:17 PM
  5. [SOLVED] Need folders copies into other folders based on excel list
    By swmatrixman in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-19-2013, 02:08 PM
  6. Find unique pictures in multiple folders
    By Jacc in forum The Water Cooler
    Replies: 2
    Last Post: 06-08-2013, 09:07 AM
  7. [SOLVED] Excel's Compress Pictures or deleting pictures doesn't seem work
    By guidod in forum Excel General
    Replies: 1
    Last Post: 01-29-2006, 02:50 AM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1