Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 506553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:42:47+00:00 2026-05-13T06:42:47+00:00

I have about 80 emails, all with attachments which I would like to save

  • 0

I have about 80 emails, all with attachments which I would like to save to a folder on my hard drive.

How this can be done with a script?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T06:42:47+00:00Added an answer on May 13, 2026 at 6:42 am

    Take a look here: Save and remove attachments from email items (VBA)

    Sub SaveAttachment()
    
        'Declaration
        Dim myItems, myItem, myAttachments, myAttachment As Object
        Dim myOrt As String
        Dim myOlApp As New Outlook.Application
        Dim myOlExp As Outlook.Explorer
        Dim myOlSel As Outlook.Selection
    
        'Ask for destination folder
        myOrt = InputBox("Destination", "Save Attachments", "C:\")
    
        On Error Resume Next
    
        'work on selected items
        Set myOlExp = myOlApp.ActiveExplorer
        Set myOlSel = myOlExp.Selection
    
        'for all items do...
        For Each myItem In myOlSel
    
            'point on attachments
            Set myAttachments = myItem.Attachments
    
            'if there are some...
            If myAttachments.Count > 0 Then
    
                'add remark to message text
                myItem.Body = myItem.Body & vbCrLf & _
                    "Removed Attachments:" & vbCrLf
    
                'for all attachments do...
                For i = 1 To myAttachments.Count
    
                    'save them to destination
                    myAttachments(i).SaveAsFile myOrt & _
                        myAttachments(i).DisplayName
    
                    'add name and destination to message text
                    myItem.Body = myItem.Body & _
                        "File: " & myOrt & _
                        myAttachments(i).DisplayName & vbCrLf
    
                Next i
    
                'for all attachments do...
                While myAttachments.Count > 0
    
                    'remove it (use this method in Outlook XP)
                    'myAttachments.Remove 1
    
                    'remove it (use this method in Outlook 2000)
                    myAttachments(1).Delete
    
                Wend
    
                'save item without attachments
                myItem.Save
            End If
    
        Next
    
        'free variables
        Set myItems = Nothing
        Set myItem = Nothing
        Set myAttachments = Nothing
        Set myAttachment = Nothing
        Set myOlApp = Nothing
        Set myOlExp = Nothing
        Set myOlSel = Nothing
    
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a webpage which I would like users to be able to send
I have a bunch of 500 emails, each with attachments. I'd like to write
I have a question about receiving emails. Using Ubuntu as the server, I have
I have about 20 grid views that I have to create. All of them
I have about 8 entities that all have a one to one relationship with
I have about 1500 images within a folder named 3410001ne => 3809962sw. I need
I have a script that gathers up all sites in IIS and emails a
So, I have looked all over for a solution to this and found 2
I have asked this question in a different post here on SO: How can
my goals (this is for training purpose): User can create(50%DONE)/edit/delete/view a created Quiz! The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.