Solved

How to save attachments from multiple e-mails at once

Posted on 2004-10-08
8
307 Views
Last Modified: 2010-04-08
I am receiveing hundreds of e-mails, each with one attachment. How can I save all of these attachments at one time vs. selecting each message individually and saving the attachments one-by-one?

Thanks

Mike
0
Comment
Question by:mschonlau
8 Comments
 
LVL 30

Expert Comment

by:VirusMinus
ID: 12261844
don't think you can do that
0
 
LVL 49

Accepted Solution

by:
sunray_2003 earned 63 total points
ID: 12262630
0
 
LVL 8

Expert Comment

by:amirinamdar
ID: 12262686
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 30

Expert Comment

by:VirusMinus
ID: 12265204
i stand corrected guys ;)
0
 
LVL 8

Expert Comment

by:amirinamdar
ID: 12265291
Ooops.... maybe sunray_2003 and me were typing the same comment at the same time!
0
 
LVL 13

Assisted Solution

by:stefri
stefri earned 62 total points
ID: 12265422
If you are comfortable vith VBA or broke:
Open VBA Editor (Alt F11)
Expand Project1/MS Outlook Modem/ThisOutlookSession
Cut and Paste the code below in right pane

'------------snip start from here
' Save attachments from selected mails to a folder
' Stefri 10/09/2004 use at your own risks
'--------------------------------------------------------------
Public Sub saveAllAttachtoDisk()

Dim objAtt As Outlook.Attachment

Dim saveFolder As String
Dim myOlExp As Outlook.Explorer
Dim myOlSel As Outlook.Selection
Dim itm As Object
Set myOlExp = Application.ActiveExplorer
Set myOlSel = myOlExp.Selection

    saveFolder = "c:\att\" '<<<<<<<<<<<<<< to be adapted to your need
    On Error Resume Next
    If myOlSel.Count > 0 Then
   
        For Each itm In myOlSel
            For Each objAtt In itm.Attachments
                objAtt.SaveAsFile saveFolder & "\" & objAtt.DisplayName
                Set objAtt = Nothing
            Next
            Set itm = Nothing
        Next
    End If
    Set myOlExp  = Nothing
    Set myOlSel = Nothing
End Sub
'----------- snip ends here
Close VBA Editor
Check Tools/Macro/Security
Set to Medium

Close Outlook, accept to save the ProjectOtm
Start OL
Accept Macros to be enabled
Select mails with attachment using Shift/Ctrl Click
Tools/Macros
Select saveAllAttachtoDisk sub
That's it
Stefri
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Outlook 2016 and Surface Pro 4 9 54
Library not Registered 16 62
Additional Mailboxes in Microsoft Outlook 2 51
What do you do to fight junk and spam in Hotmail and Outlook 22 72
Outlook Free & Paid Tools
Read this checklist to learn more about the 15 things you should never include in an email signature.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question