Skip to main content

How to archive emails in a folder without attachments in Outlook?

Author: Kelly Last Modified: 2025-04-11

Outlook's Archive feature is a handy tool for managing email storage, but it saves all email elements, including attachments, which can quickly make your archived PST file large and unmanageable. To optimize storage and improve performance, archiving emails without attachments is a practical solution. This article introduces two practical methods: using VBA for a manual approach and leveraging Kutools for Outlook for a faster, user-friendly solution.

Archive emails in a folder without attachments using VBA (Manual and Technical)

Archive emails in a folder without attachments with Kutools for Outlook 👍 (Fast and User-friendly)


Archive emails in a folder without attachments using VBA

Step 1: Open the VBA editor

In the Mail view, select the folder you want to archive. Press "Alt" + "F11" to open the Microsoft Visual Basic for Applications window.

Step 2: Insert the VBA code

Click "Insert" > "Module" to create a new module. And paste the following VBA code into the module window:

VBA: Remove all attachments from selected mail folder in Outlook

Sub RemoveAllAttachments()
Dim oItem As Object
Dim oMail As MailItem

For Each oItem In Application.ActiveExplorer.CurrentFolder.Items
    If TypeOf oItem Is MailItem Then
        Set oMail = oItem
        If oMail.Attachments.Count > 0 Then
            Do While oMail.Attachments.Count > 0
                oMail.Attachments.Remove 1
            Loop
            oMail.Save
        End If
    End If
Next
MsgBox "All attachments have been removed from the selected folder."
End Sub

Step 3: Enable background printing

Press "F5" or click the "Run" button to execute the code. A message box will confirm that all attachments have been removed from the selected folder.

the screenshot of a confirmation box

Step 4: Archive the folder

  1. Click "File" > "Info" > "Tools" > "Clean Up Old Items".
  2. In the "Archive" dialog box:
    • 1) Select the folder you just processed.
    • 2) Enter "TODAY" in the "Archive items older than" box.
    • 3) Click "Browse" to specify the destination folder for the archived file.
      the screenshot of step about archiving without attachments in outlook using kutools for outlook 4
  3. Click "OK" to complete the process.

Drawbacks:

  • Requires Technical Expertise: Running VBA scripts requires familiarity with coding, which can be challenging for non-technical users.
  • Risk of Errors: Mistakes in the VBA code or execution can lead to unintended changes, such as the accidental removal of attachments from unrelated emails.
  • Manual and Time-Consuming: The process involves multiple steps, including setting up and running the VBA script and manually archiving the emails, making it inefficient for frequent tasks.

📂 Automatically Archive Attachments with Ease!

Managing large volumes of email attachments just got effortless! With Kutools for Outlook’s Auto Detach feature, incoming attachments are automatically saved to a designated folder and replaced with hyperlinks in emails. Say goodbye to manual processes and cluttered inboxes—embrace seamless automation today!

Auto Detach Feature in Kutools for Outlook

💡 Benefits You'll Love:

  • ✔️ Save attachments automatically as they arrive
  • ✔️ Keep emails clutter-free with hyperlink replacements
  • ✔️ Fully customizable options to suit your workflow


Archive emails in a folder without attachments with Kutools for Outlook 👍

For a faster and more straightforward solution, Kutools for Outlook offers the "Detach All" feature, which allows you to efficiently remove all attachments from emails in bulk. These attachments are saved to a designated folder, enabling you to archive the emails in Outlook without attachments—all with minimal effort and just a few clicks.

Unlock ultimate email efficiency with Kutools for Outlook! Access 70 powerful features absolutely free, forever. Download the Free Version Now!

Step 1: Detach attachments

In the "Mail" view, open the folder you want to archive. Press "Ctrl" + "A" to select all emails, then click "Kutools Plus" > "Attachment Tools" > "Detach All".

shot of the Detach All button

Step 2: Set detachment preferences

  1. Set detachment preferences, click the "Browse" icon to specify a destination folder for saving the attachments.
  2. (Optional) Customize the detaching style for attachments if needed. (In this case, leave the "Detach attachments in below style" checkbox unchecked to detach all attachments directly to the destination folder.)
  3. (Optional) Check the "Attachment icon is still remained in the emails" option if you want to keep a visual indicator of the archived attachments in the emails.
  4. Click "OK" to confirm.
    shot of the Detach Settings dialog box

Step 3: Confirm detachment

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

shot of the Detach All confirmation dialog box

Step 4: Archive the folder

  1. Go to "File" > "Info" > "Tools" > "Clean Up Old Items".
  2. In the "Archive" dialog box:
    • 1) Select the folder from which you detached attachments.
    • 2) Enter "TODAY" in the "Archive items older than" field.
    • 3) Click "Browse" to specify the destination folder for the archived file.
      the screenshot of step about archiving without attachments in outlook using kutools for outlook 4
  3. Click "OK" to complete the archiving process.

Advantages:

  • Time-saving: Processes attachments in bulk, saving significant time for large folders.
  • Convenient: Keeps a visual indicator in emails for easy reference to detached files.
  • Customizable Options: Flexible detachment options allow you to tailor the process to your needs.
Note: To apply the "Detach All" utility of Kutools for Outlook, firstly, you should download and install Kutools for Outlook.

Related Articles

How to automatically archive attachments only in Outlook?

How to archive emails by year/month/date 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 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