Extract, save attachments from multiple Outlook emails

When you use Outlook on a daily basis, you are faced with a large number of emails with attachments. The tedious task of manually extracting these attachments can be time-consuming and inefficient. However, through the use of an Excel macro, you can automate the process of mass extracting attachments from all emails in a folder and its subfolders.
In this article, we will show you how you can easily recover all images from an Outlook folder or all PDF files for example.

User guide for retrieving attachments from multiple emails

Follow the steps below to extract attachments in bulk.

Download Excel Macro VBA file

Download the Excel file with VBA macro to your computer via the button below. Save it to an easily accessible location that allows macros to run (outside of OneDrive or SharePoint…)
If you are using Windows 10 or 11: right click on the file, Properties, check Unblock to be able to use macros.

Validating Excel macros

Open the downloaded Excel file.
If security warnings appear, click “Enable Macros” or “Allow Content” to allow macros to run.

Selecting the destination folder for attachments

In the Excel file, find the “Select folder where attachments will be downloaded” section.
Click the button associated with the folder selection.

Sélection du dossier pour télécharger les pièces jointes de plusieurs mails en masse

Browse your folders and choose where you want to store the extracted attachments.
Confirm your selection and close the dialog box.

Selecting the Outlook folder to process for saving files

In Outlook, select the folder you want to process.
Be careful in your selection because attachments from all subfolders in your selection will also be downloaded.

All emails in the selected folder (and all its subfolders) will be searched and all attachments will be retrieved.

If you select « Inbox », you will go through all your emails. The processing time will be extremely long if you have many emails.

We advise you to select a particular file to process.

Launching the program to extract attachments from emails

In the Excel file, find the “Start import” button.

Click this button to retrieve attachments.

Let the process run until all attachments are downloaded.

Follow the on-screen prompts to monitor progress. If your file contains many emails with many attachments, processing may take a long time.

To exit a process that seems too long, click Esc.

To test how the mass processing file for email attachments works, start by testing a few emails and a few attachments.

Logiciel pour sauvegarder les documents attachés à plusieurs e-mail Outlook

Additional settings to download Outlook email attachments in bulk

Settings can be made to define which files should be extracted and which should not.

By default, if these settings are not implemented, all attached files will be extracted.

Selecting file extensions

List of extensions to exclude from processing:

By filling in this column, for example: png.
Any files with .png extension will not be downloaded.

List of extensions to recover:

By specifying elements in this list, only files with this extension will be extracted.
For example, to obtain all PDF files, you must enter PDF in this column.

Selecting the names of attached documents

Exclusion of words:

So that files that contain a specific word or group of words are not downloaded by the mechanism, these words must be specified in this section.
For example, to exclude all files that contain the word image: enter the word image.

Word contained in file name:

If you only want to download files that have certain words in the file name, they must be completed there.