Updated 25 November 2026
Short answer: no Outlook rule can save an attachment to a folder on your PC or in OneDrive. Rules move, copy, forward or flag emails; they never write files. This guide explains exactly what rules can do in each version of Outlook, what happened to the old "Run a script" trick, and the four options that do save attachments automatically.
Free plan, no card · Never sends or deletes email · Only attachments are saved
Every Outlook rule has the same shape: conditions (from, subject contains, has attachment…) and actions. The catch is in the actions. Microsoft's rules documentation describes actions that work on the message as a whole:
There is no "save attachments to…" action in new Outlook for Windows, classic Outlook for Windows, Outlook on the web or Outlook.com. So when people say "my rule saves attachments to a folder", they usually mean a rule that moves the whole email into a mail folder such as Inbox › Invoices. The file is still inside the email, inside your mailbox, not in File Explorer and not in OneDrive.
Server rules vs. client rules. New Outlook, Outlook on the web and Outlook.com only run rules on the server. Microsoft notes that new Outlook doesn't support client-side rules, so rules migrated from classic Outlook that rely on client-only actions can't be viewed or edited there. Classic Outlook also allowed "custom actions" from third-party add-ins, but Microsoft says those run only on the computer where they are installed and only while Outlook is running.
For years the workaround was a classic Outlook rule with the action run a script, pointing to a VBA macro that saved the attachment. Outlook security updates in 2017 (May 2017 for Outlook 2016, June 2017 for Outlook 2013) changed the rule actions that start an application or run a macro. Microsoft's knowledge base article KB 3191893, "How to control the rule actions to start an application or run a macro in Outlook 2016 and Outlook 2013", documents a per-user registry value, EnableUnsafeClientMailRules under HKCU\Software\Microsoft\Office\16.0\Outlook\Security: 1 enables these actions, 0 disables them.
We don't recommend switching it on: the name says "unsafe" for a reason, security tools flag it, many company policies block it, and it only applies to classic Outlook on one PC. If you want a macro, the event-based approach below avoids the rule action entirely.
| Option | Automatic? | Works in | Saves to | Main limitation |
|---|---|---|---|---|
| 1. Save All Attachments / Download all | No, per message | All Outlook versions | Any local folder; OneDrive per file | Manual, one email at a time |
| 2. VBA macro (ItemAdd) | Yes, while Outlook is open | Classic Outlook for Windows only | Local or synced OneDrive folder | No new Outlook, web or Mac; macro security |
| 3. Power Automate flow | Yes, in the cloud | Work or school Microsoft 365 mailboxes | OneDrive for Business, SharePoint | You build and maintain the flow |
| 4. Inbox2Drive | Yes, in the cloud | Outlook / Microsoft 365, Gmail, IMAP | OneDrive, Google Drive, Dropbox | Third-party service you connect |
If you only need this now and then, the built-in commands are fine:
Combine it with a normal rule that moves emails with attachments from specific senders into a mail folder, and you at least have one place to work through. It is still manual, and it is per message. If threads make files hard to find, see how to see all attachments in an Outlook conversation.
Instead of the disabled "run a script" rule action, a macro can listen for new items in the Inbox and save their attachments. It only works in classic Outlook for Windows: Microsoft states that new Outlook for Windows doesn't support VBA and doesn't support COM add-ins either, and VBA isn't available in Outlook on the web.
For example C:\Users\you\OneDrive\Email attachments\. If it sits inside your synced OneDrive folder, the OneDrive client uploads the files for you.
In classic Outlook press Alt + F11, open Project1 › Microsoft Outlook Objects › ThisOutlookSession and paste the code below. Change SAVE_PATH.
Your macro settings (File › Options › Trust Center) must allow it to run, ideally by signing it with a certificate rather than enabling all macros. At work, your IT policy decides this.
' ThisOutlookSession - classic Outlook for Windows only
Private WithEvents InboxItems As Outlook.Items
Private Sub Application_Startup()
Set InboxItems = Application.Session.GetDefaultFolder(olFolderInbox).Items
End Sub
Private Sub InboxItems_ItemAdd(ByVal Item As Object)
Const SAVE_PATH As String = "C:\Users\you\OneDrive\Email attachments\"
Dim att As Outlook.Attachment
If TypeName(Item) <> "MailItem" Then Exit Sub
For Each att In Item.Attachments
If att.Type = olByValue Then
att.SaveAsFile SAVE_PATH & Format(Item.ReceivedTime, "yyyy-mm-dd_hhnnss") & "_" & att.FileName
End If
Next att
End Sub
Know the limits before relying on it:
SaveAsFile fail. Add error handling for production use.Using a script instead of a rule? Jobs built on Exchange Web Services (EWS Managed API, exchangelib) stop working in Exchange Online: Microsoft started blocking EWS on 1 October 2026 and turns it off for good on 1 April 2027. See how to replace an EWS attachment job.
If you search for "Outlook rule save attachment to OneDrive", this is the answer Microsoft gives: not a rule, but a cloud flow. Microsoft's own Learn exercise builds exactly this, saving to SharePoint; the OneDrive version is the same with a different connector.
Sign in to Power Automate with your work or school account, select My flows › New flow › Automated cloud flow and pick the trigger When a new email arrives (V3) (Office 365 Outlook).
Under Show all, set Include Attachments to Yes and Only with Attachments to Yes. Optionally filter by From, Subject Filter or Folder to mimic the conditions of a rule.
Add the Create file action from OneDrive for Business (or SharePoint), choose the folder path, set File Name to Attachments Name and File Content to Attachments Content.
Power Automate wraps the action in Apply to each automatically, so every attachment in the email becomes its own file. Save and send yourself a test email.
Licensing: Microsoft's Power Automate licensing FAQ says users with a Microsoft 365 license can use standard connectors, and that a flow which doesn't use a premium connector doesn't need a Premium license. Your admin can still restrict flows, so check with IT in a company tenant.
Things to plan for: two attachments with the same name (add the date to File Name), inline images in signatures, one flow per mailbox or folder, and no automatic sorting by document type unless you build conditions. For a deeper comparison, read Power Automate alternatives for saving email attachments.
If what you really want is "every attachment that arrives ends up in the right folder, without me or my PC doing anything", that is what Inbox2Drive is built for. You connect Outlook / Microsoft 365 (Gmail and IMAP mailboxes work too) and pick Google Drive, OneDrive or Dropbox. From then on it:
OneDrive/Inbox2Drive/ ├── Invoices/ │ ├── 2025/ │ └── 2026/ ├── Contracts/ └── Receipts/
What it doesn't do: Inbox2Drive only saves attachments, not email bodies. It never sends or deletes emails, so your existing Outlook rules keep working as they are. No macros, no registry changes, no flow to maintain. There is a free plan with no card required.
Step-by-step guides: Outlook to OneDrive · Outlook to Google Drive · Free tools
Not to a folder on your computer or in OneDrive. Rules in new Outlook, classic Outlook, Outlook on the web and Outlook.com act on the message: move it to a mail folder, forward it, flag it, delete it and so on. None of the built-in actions saves the attachment as a file. You need a macro in classic Outlook, a Power Automate flow or an external service.
Outlook security updates released in 2017 (May 2017 for Outlook 2016, June 2017 for Outlook 2013) changed the rule actions that start an application or run a macro. Microsoft's KB 3191893 documents a registry value, EnableUnsafeClientMailRules, that controls them. New Outlook and Outlook on the web don't offer this action, and new Outlook does not support VBA.
No built-in rule does it. The Microsoft way is a Power Automate flow with the trigger When a new email arrives (V3) and a Create file action for OneDrive for Business or SharePoint. If you use classic Outlook for Windows, a VBA macro can also save files into your locally synced OneDrive folder.
No. Microsoft states that new Outlook for Windows doesn't support VBA or COM add-ins, only Office web add-ins. Macros only work in classic Outlook for Windows.
Microsoft's licensing FAQ says users with a Microsoft 365 license can use standard connectors, and if a flow doesn't use a premium connector you don't need a Premium license. Check your own plan and your organisation's policies, because admins can restrict flows.
Questions about your setup? Email marketing@inbox2drive.com and we'll help you by email.
Checked on 25 November 2026 against Microsoft's official documentation. Menus and licensing change; follow the links for the current wording.
Connect Outlook on the free plan, pick OneDrive, Google Drive or Dropbox, and every incoming attachment lands in the right folder, even with Outlook closed.
Create a free accountFree plan, no card · Never sends or deletes email · Help by email at marketing@inbox2drive.com