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

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

Forum statistics

Threads
1,213,561
Messages
6,114,317
Members
448,564
Latest member
ED38

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