Save Email Attachments (but don’t delete them from message)

May 18, 2011
By

The following code works in Outlook 2000 and up. It saves the attachments from selected messages but does not delete the attachments from the message(s).

Copy and paste the code from this page into your ThisOutlookSession project. To do this, click in the text box, Select All using Ctrl+A, Ctrl+C to copy.

In Outlook, press Alt+F11 to open the VBA editor and expand Microsoft Outlook Objects then double click on ThisOutlookSession to open it in the editing pane and Ctrl+P to paste the code.

To use it you must first create a folder under your My Documents named OLAttachments (the code will not create it for you). Then select one or more messages and run the macro to save the attachments. You'll need to set macro security to warn before enabling macros (Tools, Macro, Security). You can change the folder name or path where the attachments are saved by editing the code.

To create a toolbar button for it, go to View, Toolbars, Customize, Commands tab. In the Categories pane, type M to jump to Macros. On the Commands side, drag the macro you created to the toolbar. Right click on the button to rename it and assign a new icon.

Customize toolbar

 

Related posts:

Save and Delete Attachments from Outlook messages
Tip 573: Save Attachments
Tip 787: Edit and Save Attachments to an email
Tip 43: Save Changes to Attachments
Save an Outlook Message as HTML (and Delete the Folder)

Tags: , , , ,

« « Save and Delete Attachments from Outlook messages

2 Responses to Save Email Attachments (but don’t delete them from message)

  1. Jose Feliciano on June 7, 2011 at 5:58 am

    This worked like a charm! Thank you! Which part of the code do I edit to prevent it from extracting the jpegs from the signature block?

  2. outlooktips on June 7, 2011 at 6:26 am

    It can’t distinguish between jpg in the message and jpg in the signature – if you never wanted to save jpg (or any file type) you’d need to add a couple of lines that said ‘if jpg type, skip’. I’ll see if i can find some code sample that will do this.

Leave a Reply

Your email address will not be published. Required fields are marked *

Connect with Facebook

*


Outlook Daily Tips by Email

*  Your Email Address:

Resources

Ask questions and share your knowledge in Outlook Forums.

More Outlook and Exchange articles available at Outlook and Exchange Solutions Center

Follow me on:

Follow @Outlooktips on Twitter   Join Outlooktips on Facebook

Advertise here