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
(94)
121,100 times
Add to favorites
Office
9/7/2016
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Preserve file time/date stamp?
    2 Posts | Last post May 03, 2019
    • Hi,
      It works like a charm! However, I do have one question? Is it possible to preserve the time/date stamp that came from the original email? If so, how would I do that? If you know how, please explain in layman's terms how to change the vba file. I do not know much about programming.
      
      Thanks
      Frank
    • I agree. This was very helpful! Thank you!
  • Extract for .msg attachments
    1 Posts | Last post April 23, 2019
    • I've been using this version just fine for some time but now im getting email with .msg attachments on which the attached files to download are inside the .msg (like double attachment).
      
      Using the script i download the .msg file and not the attached files inside the .msg.
      Any workaround in order to bypass the .msg file attachment and get the files inside?
      
      thanks.
  • Macros in Project Disabled?
    2 Posts | Last post February 04, 2019
    • I've been using this fine in Outlook 2016. But after the Patriots won the Super Bowl, I now get an error when I try to run the macro that the "Macros in project are disabled." In the project? I have enabled all macros in Outlook Trust Center and still get the same error message. Anyone know a resolution?
    • Exit Outlook, don't save project, reopen. Works now.
  • Sweet
    2 Posts | Last post February 02, 2019
    • Works like a charm in Outlook 2016. Thanks
    • +1 thanks!
  • Limit
    3 Posts | Last post December 12, 2018
    • Hi,
      
      the AttachmentSaver is working great but somehow as soon as there are more than 199 files of the same format(.csv,.txt,etc.) the files dont get saved anymore.
      
      Is there any way to avoid this limit?
    • Ok sorry just saw that there are more pages with q&a and someone already had this question.
      
      I just seem to be unable to find the secureTempFolder now ...
      
    • Found it =)
      
      If you face the same Problem thats how i got around it:
      
      C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\
      
      Try finding the Folder Content.Outlook. 
      
      then add this to every loop of your code:
      
      Kill "your path" & strAtmtFullName
      
      thx
      
      
      
  • mAttachmentSaver in a rule
    2 Posts | Last post December 12, 2018
    • ps. i'm running in Outlook 2016
    • I find it my self. I have to put a module in it wiht the next code:
      
      Sub CustomMeetingRequestRule(Item As Outlook.MeetingItem)
          If Item.ReminderSet = False Then  
              Item.GetAssociatedAppointment(False).ReminderMinutesBeforeStart = 15 
          End If
      End Sub
      
      thnx
  • mAttachmentSaver in a rule
    1 Posts | Last post December 12, 2018
    • Hi, 
      
      When i want to get this macro/script in a rule it is not working.
      
      If i make a rule, and choose "run a script" i don't see the script mAttachmentSaver.
      
      What can i do to see this script?
  • How do I Add Subject Name instead of random numbers to filename
    1 Posts | Last post October 20, 2018
    • Hello,
      I want to include or have just subject of an e-mail as file name, but not sure how to do about it.
      
      I have tried declaring following variables 
      
      Dim itm As MailItem
      Dim strSubject As String
      
      strSubject = itm.Subject
      
      and concatenate strsbject on to attachment path.
      
      strAtmtPath = strFolderPath & atmt.FileName &strSubject
      
      but, that didn't work.
      
      any help is greatly appreciated.
      
      thank you!
  • This is not working for office 2013
    1 Posts | Last post June 13, 2018
    • Hi ,
      
      Earlier I was using it in office 2010 ; but after upgrading office 2013 it was not working ,let please guide on this share new update script .
      
      Thanks
      
      Vishal Sutar
      vishst@gmail.com
  • Error from script in MS outlook 2016
    1 Posts | Last post June 05, 2018
    • I am not sure what this means but, every time i run the script i receive the error of "Failed to get the handle of the outlook window". Can any one help me with this ? My Job approved of this program to run on outlook in order to save me time, but I can't get it to work.
1 - 10 of 45 Items