Share via

Automatically saving of Outlook's attachments to specific folder on HDD

Anonymous
2024-10-18T11:08:47+00:00

Hello to everyone!

I use Microsoft 365 Apps for business - Outlook (Windows Mail app) , Intel core I3, 7th Generation, Installed RAM 8GB, 7,89 GB usable, work account.

I need to automatically download attachments from specific domain which is in my inbox (in several sub folders) to HDD.

Several people from same company (same domain) send to me emails for years and I need to download attachments from them and put on one place (one folder on HDD).

Is there any add on or something in manner to avoid saving attachments from one by one email.

Thank you in advance.

Best regards.

David

Outlook | Windows | Classic Outlook for Windows | For home

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

6 answers

Sort by: Most helpful
  1. Anonymous
    2024-10-18T13:00:19+00:00

    Hi Da vid1,

    Have a Good day.

    Thank you for posting to Microsoft Community, we are Happy to assist you.

    To better understand and investigate your issue, may I get some more detailed information from your side:

    · Will you please share me your Outlook version details? Please follow this article What version of Outlook do I have? - Microsoft Support and follow the steps to check.

    · Are you using Microsoft365 business account(@xxx.onmicrosoft.com/@yourdomain.com) or personal account (which is ended with outlook.com/hotmail.com/live.com/msn.com) or some other 3rd party POP/IMAP account?

    Based on your description we understand you need at automatically download attachment when receiving emails from specified domains.

    We have checked from our side and seems at this moment it isn't feasible in classic Outlook for Windows.

    In the meantime,

    As a workaround you could follow these steps using VBA script to achieve your requirements using classic outlook for windows.

    ·Automatically download Outlook attachments to a folder with VBA and rule

    1. Openoutlook App

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

    3. On the left pane right click on Modules -- Insert > Module, and then paste below VBA script into the newly opened Module window.

    Public Sub SaveAttachmentsToDisk(MItem As Outlook.MailItem)

    Dim oAttachment As Outlook.Attachment

    Dim sSaveFolder As String

    sSaveFolder = "D:\attachment"

    For Each oAttachment In MItem.Attachments

    oAttachment.SaveAsFile sSaveFolder & oAttachment.DisplayName

    Next

    End Sub

    **Note:**Need to change value (sSaveFolder = "D:\attachment")

    With your drive and folder on your HDD in our example we donload attachment on Drive D folder name attachment.

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

    ·Registry to enable run a script on outlook rule

    For security reasons Microsoft disabled this option you will need to Create Regedit to enable it.

    1. Close outlook
    2. Right-click the Start button, and click Run
    3. Type Regedit , and click OK.

    4. Run Regedit and locate the key:

    5. HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Security

    6. Right click the right windows and create a new DWORD (32-bit) Value.

    7. Name that new entry EnableUnsafeClientMailRulesand set its value to 1

    ·Create outlook rule to run script

    1. Go to the File - Manage Rules & Alerts.

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

    3. In the Rules Wizard dialog box that appears, please select theApply rule on messages I receive option, and click the Next button.

    4. In the Rules Wizard (Which condition(s) Select apply with specific words in the sender address and add @gmail.com for example to apply on all Gmail sender address.

    5. In the following Rules Wizard Check the run a script option

    1. Click the blue underlined "a script" text to open the Select Script dialog box. Here, choose the script you added in Step 2 and click the OK button.
    2. Click the Next button to proceed.
    3. In the Rules Wizard (Are there any exceptions?) dialog box, please click the Next button directly.
    4. In the last Rules Wizard dialog box, please name the rule in the Step 1 box,
    5. and click the Finish button.

    IF above steps not successfully achieve your requirments,

    Microsoft has separate channel resources, could you please place your concern on this dedicated VBA programming questions?

    I am sure that our experts from that team can address your query effectively and accurately.

    • Note: Please understand that our initial reply may not always immediately resolve the issue. However, with your help and more detailed information, we can work together to find a solution.

    Best Regards,

    Microsoft Community Moderator

    6 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2024-12-31T05:16:41+00:00

    Hi Eleni,

    Thanks for your detailed instructions of automatically saving attachments in outlook. I tried to execute it and it goes well. But this Marco program will also download the body screenshot. Can we download the attachments only without body pictures?

    Best regards,

    Jerry

    1 person found this answer helpful.
    0 comments No comments
  3. Anonymous
    2024-10-28T08:19:57+00:00

    Hi Da vid1,

    Thank you for the updates on your issue.

    From your description, it seems you need to download attachments from emails that have already arrived in your mailbox.

    Meanwhile, you can follow the steps above, and while setting up the Outlook rule, make sure to select the checkbox for “Run this rule on messages already in Inbox” before clicking Finish.

    This option will apply the rule to all email messages currently in your inbox.

    Please refer to the figure below for guidance.

    Best Regards,

    Microsoft Community Moderator

    1 person found this answer helpful.
    0 comments No comments
  4. Anonymous
    2024-10-27T15:29:41+00:00

    Dear Eleni,

    Thank you so much for so fast and dedicated reply and sorry with my delay with respond.

    My Outlook version details are Microsoft Outlook for Microsoft 365 MSO (Version 2409 Build 16.0.18025.20160) 64-bit.

    Also, I am using Microsoft365 business account ******@mydomain.com.

    "Based on your description we understand you need to automatically download attachment when receiving emails from specified domains." - Incorrect

    Sorry if I made mistake and didn't explain well.

    I already have emails from specific domain in my inbox and I need to "extract" already received attachments from these emails to dedicated folder on my HDD.

    I didn't try your suggestion for VBA because it refers to newly arrived attachments, not on existing.

    Can you help me about existing emails/attachments already in my inbox (even it means to download all attachments from inbox, but not from domain that especially I need)

    Thank you very much for your dedication.

    Best regards.

    David

    1 person found this answer helpful.
    0 comments No comments
  5. Anonymous
    2024-10-18T12:34:01+00:00

    There are third party paid for addins that can deal with mail/attachments automatically.

    Generally if O365 then any attacment downloaded would be saved to OneDrive

    0 comments No comments