
📎 This article includes 1 downloadable practice file ↓
Advertisement
Macros can do in a click what takes an hour by hand. These three only read mail and save copies; none deletes or sends anything, so they’re safe to try.
Install
- Alt+F11 in Outlook > File > Import File > outlook-inter-07-macros.bas.
- File > Options > Trust Center > Macro Settings: “Notifications for all macros” (or sign the project with a self-certificate, via SelfCert.exe, to avoid prompts).
- Add the macros to the Quick Access Toolbar (Choose commands from: Macros).
| Macro | Does |
|---|---|
| SaveSelectedAttachments | Saves real attachments of the selected mails to Documents\Mail Attachments, named “2026-10-05 invoice.pdf” |
| UnreadReport | Lists unread counts per folder under the Inbox |
| ReplyWithTemplate | Replies to the selected mail with your “Payment reminder.oft” on top, and shows it for you to send |
For Each att In item.Attachments
If att.Type = 1 Then ' a real file, not a linked item
att.SaveAsFile folder & Format(item.ReceivedTime, "yyyy-mm-dd") & " " & CleanName(att.FileName)
End If
Next att
⚠️ We wrote and checked these against the Outlook object model by reading, not by running them on a live mailbox. Test on two or three mails first. Many companies block Outlook macros by policy; if so, use the Power Automate flow in lesson 8.
The new Outlook and Outlook on the web don’t run VBA at all.
Practice
Import the module and run SaveSelectedAttachments on two mails with attachments.
📎 Practice files for this article
- 💾Macro module (.bas)Three macros; none deletes or sends mail.⬇ BAS · 3 KB
Free to use for learning. Files with macros (.bas) are plain text — import them with Alt+F11 → File → Import File, and always test on a copy.
Advertisement
✨ Ask AI about this article
Stuck on a step? Ask a question and the AI answers using this article.
Free · AI can be wrong