Solved

How to save attachments from multiple e-mails at once

Posted on 2004-10-08
8
306 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Resolve Outlook connectivity issues after moving mailbox to new Exchange 2016 server
Outlook Free & Paid Tools
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…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

863 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now