Save embedded pictures in their original format

Pictures buttonYou’ve probably come across this at least once; You receive a nicely HTML formatted message with embedded pictures so the sender can tell the story with the pictures.

In this case, you can’t use the “Save All Attachments” command to quickly save all the images that are included in the email.

The macro in this guide allows you to save all the embedded pictures in their original file format to a selected folder.


SaveAllAttachments VBA Macro

Visual Basic buttonThe SaveAllAttachments macro allows you to save all pictures that are shown in the message body (embedded) as well as all other attachments in their original file format.

When executing the macro you’ll save all attachments with a date and time stamp to a folder of choice. Note that it fully respects the list of blocked file types for attachments to prevent any security risks.

By adding a button for the macro to the main Outlook window and/or the opened Message item window, you have quick access to it similar to the native Save All Attachments command.

Quick Install

Use the following instructions to configure the macro in Outlook;

  1. Download this code-file (saveallattachments.zip) or copy the code below.
  2. Open the VBA Editor (keyboard shortcut ALT+F11)
  3. Extract the zip-file and import the SaveAllAttachments.bas file via File-> Import…
    If you copied the code, paste it into a new module.
  4. Add a reference to: Microsoft Shell Controls And Automation.
    Tools-> References…
  5. Sign your code so you won’t get any security prompts and the macro won’t get disabled.
  6. Add a button for easy access to the macro.

You can place a "Save All Attachments" button to your Quick Access Toolbar for easy access to the macro.
Add a button of the macro to the QAT for quick access to it.

Macro Code

The following code is contained in the zip-file referenced in the Quick Install. You can use the code below for review or manual installation.

Click in the area above and press CTR+A to select all. Press CTRL+C to copy the code.