+ Reply to Thread
Results 1 to 3 of 3

Loop Through Folder, Create Emails with Sub Folder Names in Subject, Attach files in sub

  1. #1
    Registered User
    Join Date
    06-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    51

    Loop Through Folder, Create Emails with Sub Folder Names in Subject, Attach files in sub

    Hi All,
    I have searched for a while, but only found bits and pieces of what I need. I don't think it's even worth it to post my spreadsheet.

    I want to search through a particular folder, create an email draft with the subject line that same as each sub folder name, attach any files in that sub folder, and then loop through the rest of the sub folders.


    Ex: C:/ contains 3 sub folders.

    C:/Test1, C:/Test2, C:/Test3

    Test1 has 3 Excel files, Test2 contains 4 Excel files, Test3 contains 1 Excel files

    The first outlook email draft would have subject "Test1", and would have 3 Excel files attached to it.

    I would greatly appreciate any ideas.

  2. #2
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: Loop Through Folder, Create Emails with Sub Folder Names in Subject, Attach files in s

    Perhaps something like this?
    Note: I've assumed a slightly different file structure. That is...
    in C:\Test\ there are 3 subfolders C:\Test\Test1, C:\Test\Test2 and C:\Test\Test3

    Also, I've set it to attach ALL files within the subfolders.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    51

    Re: Loop Through Folder, Create Emails with Sub Folder Names in Subject, Attach files in s

    Quote Originally Posted by quekbc View Post
    Perhaps something like this?
    Note: I've assumed a slightly different file structure. That is...
    in C:\Test\ there are 3 subfolders C:\Test\Test1, C:\Test\Test2 and C:\Test\Test3

    Also, I've set it to attach ALL files within the subfolders.

    Please Login or Register  to view this content.
    Quekbc: This is exactly what I was looking for! Thank you so much for your help.

+ 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: 12
    Last Post: 03-09-2015, 05:52 PM
  2. Create FOLDER in subfoldesr and move folders with specific names into FOLDER
    By Amarjeet Singh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-25-2015, 09:46 AM
  3. Copy all emails in outlook folder and paste them in similar system folder and ms access
    By Megatronixs in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-28-2014, 07:31 AM
  4. Macro to create a folder and then save all files in that folder
    By gokzee in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-27-2013, 01:49 PM
  5. Replies: 2
    Last Post: 04-15-2005, 12:06 PM

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