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.
- Close outlook
- Right-click the Start button, and click Run
- 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
- 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.
- Click the Next button to proceed.
- In the Rules Wizard (Are there any exceptions?) dialog box, please click the Next button directly.
- In the last Rules Wizard dialog box, please name the rule in the Step 1 box,
- 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