Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to automatically download/save attachments from Outlook to a certain folder?

Generally speaking, you can save all attachments of one email with clicking Attachments > Save All Attachments in Outlook. But, if you need to save all attachments from all received emails and receiving emails, any ideal? This article will introduce two solutions to automatically download attachments from Outlook to a certain folder.

Quickly save/export all attachments from multiple emails in Outlook

Normally we can save attachments from one email with activating the Attachment Tools and applying the Save All Attachments feature in Outlook. But, what if saving attachments from multiple emails, or from the whole mail folder in Outlook? Try Kutools for Outlook's Detach All (Attachments) feature. Click for 60-day free trial without limitation!
save attachments in multiple emails kto9
By the way, Kutools for Outlook also provides a workaround to automatically save or export all attachments from all incoming emails in Outlook.

Kutools for Outlook: 100+ New Advanced Tools for Outlook.
Office Tab: Enable Tabbed Editing and Browsing in Office, Just Like Chrome, Firefox, IE 8/9/10.
Classic Menu: Bring Old Menus and Toolbars Back to Office 2007, 2010, 2013, 2016 and 2019.

arrow blue right bubble Automatically download Outlook attachments to folder with VBA and rule

This method will introduce a VBA script, and run this scrip with a rule to automatically download and save Outlook attachments to a certain folder. Please do as follows:

1. Press Alt + F11 keys to open the Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and then paste below VBA script into the new opening Module window.

VBA: Auto Save Outlook Attachments into a certain folder

Public Sub SaveAttachmentsToDisk(MItem As Outlook.MailItem)
Dim oAttachment As Outlook.Attachment
Dim sSaveFolder As String
sSaveFolder = "C:\Users\DT168\Documents\outlook-attachments\"
For Each oAttachment In MItem.Attachments
oAttachment.SaveAsFile sSaveFolder & oAttachment.DisplayName
Next
End Sub

Note: Please find out sSaveFolder = "C:\Users\DT168\Documents\outlook-attachments\", and replace the destination folder’s path as you need.

3. Save the VBA Script and close the Microsoft Visual Basic for Applications window.

4. Go to the Mail view, and click Home > Rules > Manage Rules & Alerts. See screenshot:

5. In the opening Rules and Alerts dialog box, please click the New Rule button on the E-mail Rules tab. See screenshot:

6. Now in the Rules Wizard dialog box, please click to select the Apply rule on messages I receive option, and click the Next button.

7. In the Rules Wizard (which condition(s) do you want to check?) dialog box, please uncheck any option, and click the Next button. And then click the Yes button in the popping up Microsoft Outlook dialog box. See screenshot:

8. Now in the Rules Wizard (what do you want to do with the message?) dialog box, please: (1) Check the run a script option; (2) Click the text of a script to open the Select Script dialog box, select the script we added in Step 2 and click the OK button; (3) Click the Next button.

9. In the Rules Wizard (Are there any exceptions?) dialog box, please click the Next button directly.

10. Now in the last Rules Wizard dialog box, please name the rule in the Step 1 box, check options as you need in the Step 2 section, and click the Finish button.

11. Close the Rules and Alerts dialog box.

And now all attachments are downloaded from your email account and saved into the specified destination folder. And all attachments of incoming emails will be automatically downloaded and saved into the specified folder too.


arrow blue right bubble Automatically download Outlook attachments to folder with Kutools for Outlook

If you have Kutools for Outlook installed, you can apply its Auto Detach option to automatically download all Outlook attachments and save to a certain folder easily.

Kutools for Outlook - With more than 20 handy Outlook add-ins, free to try with no limitation in 60 days

1. Click Kutools > Options. See screenshot:

2. In the Attachment Options dialog box, go to the General tab, and: (1) Check the Automatically detach all received attachments option; (2) Click the Browse button   to specify the destination folder; (3) Check the Create subfolders in the followings style option, and specify a folder structure from below drop down list; (4) Click the Ok button. See screenshot:

From now on, all attachments of incoming emails will be automatically downloaded and saved into the specified destination folder.

Note: You can apply Kutools for Outlook’s Detach All (Attachments) feature to quickly download/save all attachments from multiple/all received emails in Outlook.
save attachments in multiple emails

Click to download Kutools for Outlook, 60-day free tiral no limitation!

arrow blue right bubbleDemo: Automatically download Outlook attachments to folder with Kutools for Outlook

Tip: In this Video, Kutools tab is added by Kutools for Outlook. If you need it, please click here to have a 60-day free trial without limitation!


arrow blue right bubbleRelated Articles



Kutools for Outlook

More than 100 Advanced Functions for Outlook 2010, 2013, 2016, 2019 and 365

screen shot kutools for outlook tiny for banner 201812

More Features  |  Free Download  |  Only $39.00 for hundreds of functions

Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Tony Cheung · 1 years ago
    I had trouble with this but I got from another resource that you have to allow all macros to run in Outlook. You can achieve this by following the following steps:
    1 - Goto File -> Trust Center then click on Trust Center Settings on the right
    2 - Macro Settings -> Enable all macros
    3 - Restart Outlook and then it should work
  • To post as a guest, your comment is unpublished.
    EC · 1 years ago
    I am interested in the Auto Save Attachment feature, but 2 questions:
    1. Can I activate this ONLY for a subfolder? I don't want this to run on every single email. Only emails that are redirected to a subfolder via an Outlook Rule.
    2. When you say "detach", to me that implies the attachment is removed from the message permanently. I don't want to remove the attachment. I just want to download a copy of it to a folder. So which is it? Does your software remove the attachment or does it just save a copy?
    • To post as a guest, your comment is unpublished.
      Tang Kelly · 1 years ago
      Hi EC,
      Thank you for your interesting in our software.
      1. At present, the Auto Detach feature will save every attachment arriving in the Inbox folder by default, and the Detach feature will remove attachments and leave hyperlinks linking to the saved attachments.
      2. Our development team is improving and enhancing both feature now. In the near future, users are entitled to auto detaching attachments by special criteria (such as color, flag), folders, etc.; and the detach feature will be enhanced to several sub-features, such as save attachments, delete attachments and leave hyperlinks, delete attachments, etc. Please be patient for the new version.
      • To post as a guest, your comment is unpublished.
        Almira · 10 months ago
        Hi! Did you finish with this project? I mean do you have new version which can do 1) and 2) steps? I need save attachments from 1 category in email box, I don't need all of attachments.
  • To post as a guest, your comment is unpublished.
    Casper Delport · 1 years ago
    I want my attachments to be downloaded into (automaticall)y created date folders under my predefined folders. Example: I want all my Gsuite attachments and emails to download into an automatically created date folder (mm yyyy) under the folder Gsuite as with this google app https://chrome.google.com/webstore/detail/save-emails-and-attachmen/nflmnfjphdbeagnilbihcodcophecebc. Is it possible with Kutools? If not, can someone help me with a script?
    • To post as a guest, your comment is unpublished.
      Tang Kelly · 1 years ago
      Hi Casper,
      Kutools can automatically create subfolder named as email subject, and all attachments in the specified email will be saved into this subfolder.
      At present, our development team is optimizing the Detach All Attachments feature and Auto Detach All Attachments feature, and both features will be enhanced and efficient in future.
  • To post as a guest, your comment is unpublished.
    Dhinesh · 1 years ago
    I have done all scripting to download the attachments from outlook mail and my script is working fine when i run it manually. I would like to automate the process using the Rule option. But i couldn't see my macro in the Rules Wizard window. I have enabled the below option in the registry too
    HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Security
    DWORD: EnableUnsafeClientMailRules
    Value: 1

    But still i couldn't see my macro in the Rule Wizard list. My rule wizard list is empty but i have created the macro already and its manually working fine. I have to bring the macro in my Rules wizard to automate the process. Please help me if you have any ideas!
  • To post as a guest, your comment is unpublished.
    Eric VT · 1 years ago
    Hi, script works fine ... but want to extract the PDF's from a sub-folder, not from the main Inbox. Is there a way to change the script ?
    Thank you in advance !
    • To post as a guest, your comment is unpublished.
      · 1 years ago
      Hi Eric,
      Below VBA script will save all PDF attachments from mail folders. For saving from a certain folder, you can specify the folder when manually running the rule.


      Public Sub SaveAttachmentsToDisk(EmailItem As Outlook.MailItem)
      Dim xAttachment As Outlook.Attachment
      Dim xDotPos As Integer
      Dim xSavePath As String, xFileType As String
      xSavePath = "C:\Users\DT168\Documents\outlook-attachments\"
      For Each xAttachment In EmailItem.Attachments
      xDotPos = InStrRev(xAttachment.DisplayName, ".")
      xFileType = Mid(xAttachment.DisplayName, xDotPos, Len(xAttachment.DisplayName) - xDotPos + 1)
      If xFileType = ".pdf" Then
      xAttachment.SaveAsFile xSavePath & xAttachment.DisplayName
      End If
      Next
      End Sub
      • To post as a guest, your comment is unpublished.
        Raynardo Pardo · 11 months ago
        Hello, Is there a VBA script for CSV attachment. I currently have report jobs that automatically goes into named folders in outlook I would now like for those files in the folders extract itself and go into the corresponding folders on my desktop. Hope this makes sense. Please Help! I am very new to VBA.