Here we can see, “How to: Set an Outlook Rule to Download Attachments to a Folder”
Users of Outlook frequently need to download files that have been attached to their emails. As a result, it would be convenient if Outlook automatically downloaded all email attachments from newly received emails. With a VBA script and a rule, you can set Outlook to do precisely that.
What is the best way to set up an Outlook rule to download attachments?
1. Set up the VBA script
- To begin, create a VBA script that downloads the attachments to a designated location. The Microsoft Visual Basic window is opened by pressing the Alt + F11 hotkey.
- To open a new module window, click Insert and Module.
- Copy this VBA code with the Ctrl + C hotkey: 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
- Use the Ctrl + V hotkey to paste the code into the VBA Module window.
- Note that the ‘C:\Users\DT168\Documents\outlook-attachments’ path in that script is an example. Replace ‘C:\Users\DT168\Documents\outlook-attachments’ with the full path of the folder to download the attachments to.
- Save the new script after that.
- The VBA Module window should now be closed.
2. Create a rule in Outlook for the VBA script
- Click the Rules button to create an Outlook rule for the download attachment script.
- To launch the Rules and Alerts window, select Manage Rules & Alerts.
- To create a new rule, press the New Rule button.
- To open the window directly below, select the Apply rule on the message I receive option and click Next. Certain users may need to select the Check messages as they arrive in older Outlook versions.
- Check the box to run a script.
- To open the Select Script window, click a script.
- Click the OK button after selecting the download attachment script in the Select Script window.
- Next should be selected.
- In the text box on the last Rules Wizard dialogue box, give the rule a title.
- Select the option to enable this rule.
- You can also select the Run this rule on messages already in the ‘Inbox’ option if you like. According to this rule, the following should be written in the rule description box: Only run macro title> after the message arrives on this computer.
- Finish by pressing the Finish button.
Following that, Outlook will download attachments to the folder specified in the script. You won’t have to download the attachments anymore manually. Open File Explorer and navigate to the folder path indicated in the macro to go through the attachments.
I hope you found this guide useful. If you’ve got any questions or comments, don’t hesitate to use the shape below.
1. Is it possible to save email attachments to a folder automatically?
All attachments delivered to your Office 365 inbox will be saved in a Power Automate-created folder called Email attachments. Clicking the “Create Flow” button at the bottom of the screen is all it takes.
2. How do I get Outlook to extract attachments automatically?
- Run the software when it has been installed. Navigate to the Open File tab.
- As demonstrated in the screenshot, the programme instantly offers a preview of the emails.
- Select Extract from the drop-down menu.
- To extract attachments from Outlook files, select the mailbox on the left side.
3. How can I download email attachments automatically?
- Toggle the button.
- Toggle the button.
- Tap. Mail. in the. Application Settings. section.
- Slide the to download attachments automatically. Set the option “Auto Download Attachments” to “On.”
4. How can I set up an Outlook rule for downloading attachments?
5. Automatically download attachments from specific sender