Skip to main content

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

I frequently receive emails with attachments which take up huge space in Microsoft Outlook. And now I want to count the total number of attachments for metrics and revising. Any good ideas? I find out two workarounds to solve this problem:

Count the total number of attachments in multiple emails with saving these attachments firstly in Outlook

Normally we can save attachments from one email with activating the Attachment Tools and applying the Save All Attachments feature in Outlook. But, what if saving attachments from multiple emails, or from the whole mail folder in Outlook? Try Kutools for Outlook's Detach All (Attachments) feature. Click for 60-days free trial without limitation!

save attachments in multiple emails 2

Office Tab - Enable Tabbed Editing and Browsing in Microsoft Office, Making Work a Breeze
Kutools for Outlook - Boost Outlook with 100+ Advanced Features for Superior Efficiency
Boost your Outlook 2021 - 2010 or Outlook 365 with these advanced features. Enjoy a comprehensive 60-day free trial and elevate your email experience!

arrow blue right bubble Count the total number of attachments in selected emails with VBA

This method will introduce a VBA to count the total number of attachments in selected emails in Outlook. Please do as follows:

1. Select the emails whose attachments you will count, and press the Alt + F11 key simultaneously to open the Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and then paste below VBA code into the opening 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 & " attachements"

End Sub

3. Press the F5 key or click the Run button to run this VBA.

And now a dialog box comes out and displays how many attachments there are in the selected emails. See screenshot:


arrow blue right bubble Export and count attachments in selected emails with Kutools for Outlook

If you have Kutools for Outlook installed, you can easily apply the Detach All (Attachments) feature to export all attachments from multiple selected emails, and then count exported attachments easily. Please do as follows:

Kutools for Outlook: Ultimate Outlook toolkit with over 100 handy tools. Try it FREE for 60 days, no limitations, no worries!   Read More...   Start Free Trial Now!

1. Select the emails whose attachments you will export and count, and click Kutools > Others > Detach All. See screenshot:

2. A dialog box will come out and ask for your reconfirmation about detaching attachments. Please click the Yes button to go ahead.

3. In the opening Browse For Folder dialog box, please specify a folder you will save the exported attachments into, and click the OK button.

And now all attachments in the selected emails are exported and saved into the destination folder.

4. Open the destination folder, and select all the attachments you exported just now, and you will get the number of exported attachments at the Status bar of opening folder. See screenshot:

Note: If one email contains more than one attachment, these attachments will be saved into one folder and named with this email’s subject.

Kutools for Outlook: Supercharge Outlook with over 100 must-have tools. Test drive it for FREE for 60 days, no strings attached!   Read More...   Download Now!


arrow blue right bubbleDemo: Export and count attachments in selected emails with Kutools for Outlook

Tip: In this Video, Kutools tab is added by Kutools for Outlook. If you need it, please click here to have a 60-day free trial without limitation!


arrow blue right bubbleRelated Articles


Best Office Productivity Tools

Kutools for Outlook - Over 100 Powerful Features to Supercharge Your Outlook

🤖 AI Mail Assistant: Instant pro emails with AI magic--one-click to genius replies, perfect tone, multilingual mastery. Transform emailing effortlessly! ...

📧 Email Automation: Out of Office (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: Easily 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   /  Boost Your Outlook Productivity with Tabbed Views  /  Minimize Outlook Instead of Closing ...

👍 One-click Wonders: Reply All with Incoming 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 ...

Over 100 Features Await Your Exploration! Click Here to Discover More.

Read More       Free Download      Purchase
 

 

Comments (2)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
This code is great and all but for some reason the number it is counting as email 'attachments' is wrong. There are 19 email attachments and its saying there are 22. Is this counting something else as an attachment?
This comment was minimized by the moderator on the site
This is because "oItem.Attachments.Count" also counts embedded pictures (for example in the signature) as attachments. So this code will not work as intended once such an e-mail is part of the selection.
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations