VBA - Outlooks Emails in Folder - Extract attachments and Date Stamp File Names

lager1001

Board Regular
Joined
May 17, 2019
Messages
88
I have weeks of emails stored in a folder on a network server. Each email contains the same file attachments each day. These are received from an automated reporting system so the file names do not change. What I need to do in VBA is to point a macro to the server folder, have it loop through each email, extract the attachments and save each one with it's original file name as well as the date that the email was received.

EXAMPLE: ABCDEFG.xls should be ABCDEFG_08_31_2020.xls for the email received on 08_31_2020 and HIJKLMNO.xls should be HIJKLMNO_08_31_2020. xls.

the emails received the next day also have the same file names but should be ABCDEFG_09_01_2020.xls and so on and so forth.

Can anyone assist?

Thank you.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,214,839
Messages
6,121,892
Members
449,058
Latest member
Guy Boot

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top