Save attachments from multiple selected items in Outlook (VBA)

This VBA sample illustrates how to save attachments from multiple selected items in Outlook.

 
 
 
 
 
4.8 Star
(87)
96,101 times
Add to favorites
Office
9/7/2016
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Delete the file if it exists
    1 Posts | Last post November 30, 2017
    • What would be the proper coding to check the path for the file name and if it exists to delete it?
  • Can I get time stamp from the email as well?
    1 Posts | Last post November 29, 2017
    • How can I get the time stamp from the email that the document was attached to also?
  • Need the updated one for Outlook 2016
    3 Posts | Last post September 28, 2017
    • Need the updated one for Outlook 2016
    • Yes, I need an updated version for Outlook 2016 as well.
    • I have used this version with no issues on Outlook 10, 13 and 16
  • Limit of 200 saved attachments
    3 Posts | Last post September 25, 2017
    • Hi,
      
      Thanks for a great work saver! Works great, albeit with one small caveat:
      
      When selecting more than 200 items, the macro (at least in my environment) saves only 200 attachments. The message at the end of the macro shows a correct number (ie "377 attachments saved", nonetheless the real number of files in the target directory is 199.
      
      I am wondering if that's something related to the topic discussed here: http://www.pcreview.co.uk/threads/runtime-error-when-using-saveasfile-method-to-save-outlook-attachm.3495945/
      
      Perhaps my environments puts some kind of limitation on the number of files saved?
      
      Thanks!
    • Hello,
      Have you gotten this limit resolved? I am finally cleaning my emails and I have about 2000 emails that I would like to download the attachments. This bas is still awesome if I want to break 200 at a time; but it would be nice to get an idea about the 199 limit.
      
      Regards,
    • I encountered this problem and found that my macro was causing the SecureTempFolder to get filled up with copies of my attachments and not cleaning it up until the whole thing was finished.  I was able to work around it by having the macro kill the files from that folder after it was done with them.
  • Error Message
    1 Posts | Last post August 17, 2017
    • I keep getting a message that "No attachment(s) in the selected Outlook Items"
      Any idea what might be happening.
  • Overwrite old attachments
    1 Posts | Last post March 07, 2017
    • Thanks for the sample! 
      
      I would like to overwrite attachments with the same name based on the date that i received the mail (latest attachment should be saved). Is this possible?
      
      Also I would only like to save Excel files.
      
      I would really appreciate your help 
  • Saving only .Doc & PDF (no embedded pictures, jpegs etc)
    1 Posts | Last post December 07, 2016
    • HI, 
      
      THank you. This works like a charm!
      
      I only want to save documents like PDF, .Doc, .Docx. I do not want embedded pictures, jpegs etc
      
      Is there a way of doing this?
      
      Many thanks
      
      Stuart
  • Saving attachments from each email in a different subfolder
    1 Posts | Last post October 21, 2016
    • Is it possible to modify the macro so it creates a subfolder for each email and downloads each specific email's attachments to that subfolder? We have 300 emails and thousands of attachments to download and organize, this would be really helpful.
      
      Thank you for this tool, works great!
  • Change Date
    2 Posts | Last post September 26, 2016
    • Can you please help me to modify the date of the created file when already exist by the Received Date of the email? instead of Format(Now, "_mmddhhmmss") part I would like to add the Received Date and Time.
    • Hello,
      Have you gotten this limit resolved? I am finally cleaning my emails and I have about 2000 emails that I would like to download the attachments. This bas is still awesome if I want to break 200 at a time; but it would be nice to get an idea about the 199 limit.
      
      Regards,
      
  • Running the macro in the Advanced Find Dialog Box
    1 Posts | Last post July 20, 2016
    • Hi,
      
      does anyone knows how to run the macro after have executed an Advanced Search?
      
      Thanks.
1 - 10 of 34 Items