How to count the total number of attachments in selected emails in Outlook?
Emails with attachments can quickly fill up your mailbox, consuming valuable storage space in Microsoft Outlook. If you're looking to analyze and manage this storage better, counting the total number of attachments across selected emails is a great starting point. This article introduces two effective methods: using VBA to calculate the number of attachments directly in Outlook and employing Kutools for Outlook for a more streamlined and user-friendly approach.
Count the total number of attachments in selected emails with VBA (Technical and Manual)
Export and count attachments in selected emails with Kutools for Outlook π (Efficient and User-Friendly )
Count the total number of attachments in selected emails with VBA
If youβre comfortable with VBA, this method allows you to count the total number of attachments across selected emails directly in Outlook.
1. In the Mail view, select the emails whose attachments you want to count. Press "Alt" + "F11" to open the Microsoft Visual Basic for Applications window.
2. Click "Insert" > "Module", and paste the following VBA code into the module window:
VBA: Count the number of attachments in selected emails
Sub CountAttachmentsMulti()
Dim oItem As Object
Dim iAttachments As Integer
For Each oItem In ActiveExplorer.Selection
iAttachments = oItem.Attachments.Count + iAttachments
Next
MsgBox "Selected " & ActiveExplorer.Selection.Count & " messages with " & iAttachments & " attachments"
End Sub
3. Press "F5" or click the "Run" button to execute the VBA.
4. A dialog box will appear, displaying the total number of selected emails and their attachments.
Drawbacks:
- Technical Expertise Needed: Requires familiarity with VBA, which may not be suitable for all users.
- Manual Execution: The code must be run manually each time.
- No Export Functionality: This method only provides a count and does not allow further processing of attachments.
π Effortlessly Save Attachments from Multiple Emails
Tired of saving attachments one email at a time in Outlook? Streamline your workflow with Kutools for Outlook! The powerful Save All (Attachments) feature lets you save attachments from multiple emails or entire folders in just a few clicks. Say goodbye to tedious manual processes and take control of your inbox effortlessly.

Export and count attachments in selected emails with Kutools for Outlook π
For a more streamlined and accessible solution, "Kutools for Outlook" offers the "Detach All" (Attachments) feature. This tool not only exports all attachments from selected emails but also makes it easy to count and organize them.
Unlock ultimate email efficiency with Kutools for Outlook! Access 70 powerful features absolutely free, forever. Download the Free Version Now!
Step 1: Select emails and access Detach All
In the "Mail" view, select the emails containing attachments. Click "Kutools Plus" > "Attachment Tools" > "Detach All".
Step 2: Configure detachment settings
- In the "Detach Settings" dialog box, click the
"Browse" icon to specify a destination folder for saving the attachments.
- Leave the "Detach attachments in below style" checkbox unchecked to save all attachments directly into the folder.
- (Optional) Check the "Attachment icon is still remained in the emails" option to keep a visual reference in your emails.
- Click "OK" to confirm.
Step 3: Confirm the detachment
When the confirmation dialog box appears, click "Yes" to proceed.
Step 4: Count the attachments
Open the destination folder in File Explorer. Select all exported attachments in the folder, and the total number will be displayed in the Status bar.
Advantages:
- Batch Processing: Handles multiple emails and attachments simultaneously.
- Easy and Intuitive: Designed for users of all skill levels, no coding required.
- Export for Further Analysis: Allows attachments to be organized, shared, or archived easily.
- Visual Indicators: Optionally retains attachment icons in emails for better tracking.
Demo: Export and count attachments in selected emails with Kutools for Outlook
Discover the Kutools / Kutools Plus tab in this video, added by Kutools for Outlook. Now, most features, including AI functionalities, are free! Pro features come with a 30-day trial without limitations!
Related Articles
Count the number of recipients in To, Cc, and Bcc fields in Outlook
Best Office Productivity Tools
Breaking News: Kutools for Outlook Launches Free Version!
Experience the all-new Kutools for Outlook FREE version with 70+ incredible features, yours to use FOREVER! Click to download now!
π€ Kutools AI : Uses advanced AI technology to handle emails effortlessly, including replying, summarizing, optimizing, extending, translating, and composing emails.
π§ Email Automation: Auto Reply (Available for POP and IMAP) / Schedule Send Emails / Auto CC/BCC by Rules When Sending Email / Auto Forward (Advanced Rules) / Auto Add Greeting / Automatically Split Multi-Recipient Emails into Individual Messages ...
π¨ Email Management: Recall Emails / Block Scam Emails by Subjects and Others / Delete Duplicate Emails / Advanced Search / Consolidate Folders ...
π Attachments Pro: Batch Save / Batch Detach / Batch Compress / Auto Save / Auto Detach / Auto Compress ...
π Interface Magic: πMore Pretty and Cool Emojis / Remind you when important emails come / Minimize Outlook Instead of Closing ...
π One-click Wonders: Reply All with Attachments / Anti-Phishing Emails / πShow Sender's Time Zone ...
π©πΌβπ€βπ©π» Contacts & Calendar: Batch Add Contacts From Selected Emails / Split a Contact Group to Individual Groups / Remove Birthday Reminders ...
Use Kutools in your preferred language β supports English, Spanish, German, French, Chinese, and 40+ others!

