Skip to main content

How to count the total number of attachments in selected emails in Outlook?

Author: Kelly Last Modified: 2025-04-10

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.

doc-count-attachment-01

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.

Save attachments in multiple emails

Download Kutools for Outlook Now


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".

shot of the Detach All button

Note: Hold "Ctrl" to select multiple non-adjacent emails or "Shift" to select a range of adjacent emails.

Step 2: Configure detachment settings

  1. In the "Detach Settings" dialog box, click the the folder icon "Browse" icon to specify a destination folder for saving the attachments.
  2. Leave the "Detach attachments in below style" checkbox unchecked to save all attachments directly into the folder.
  3. (Optional) Check the "Attachment icon is still remained in the emails" option to keep a visual reference in your emails.
  4. Click "OK" to confirm.
    shot of the Detach Settings dialog box

Step 3: Confirm the detachment

When the confirmation dialog box appears, click "Yes" to proceed.

shot of the Detach All confirmation dialog box

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.

doc-count-attachment-05

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.
Note: To apply the "Detach All" utility of Kutools for Outlook, firstly, you should download and install Kutools for Outlook.

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


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 ProBatch 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!

Instantly unlock Kutools for Outlook with a single click. Don't wait, download now and boost your efficiency!

kutools for outlook features1 kutools for outlook features2