VBA to Extract information from Outlook 365 to Excel 365

mazher

Active Member
Joined
Nov 26, 2003
Messages
363
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hi please can someone help me to extarct the the following information from the sent folder of an email address ( I am using Office 365)

Cell A1 = Start Date
Cell B1 = End Date
Cell C1 = abcd@mydomain.com

I need the following infortion from the Sent Folder

Date, Time
Subject
Files names of the attachement.

In some sent items there are 50 than attachements and in some there are no attachements.
I need the information for only those emails sent where ther was an attachment.


Any help will be much appreciated @John_w
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
You can achieve this task using Microsoft Power Automate in Office 365.

Here's how to set it up:

Create a New Flow: Go to Power Automate in your Office 365 account and create a new flow.

Trigger:
Use the "Office 365 Outlook - When a new email is received" trigger. Configure it to monitor the Sent Items folder of the specified email address (Cell C1).

Filter for Emails with Attachments:
Add a condition to check if the email has attachments. You can use the "Has Attachments" property of the email.

Get Email Details:
Within the condition, use actions such as "Get email details" or "List attachments" to retrieve the required information like date, time, subject, and attachment file names.

Output to Excel:
Use the "Excel - Add a row into a table" action to add the extracted information to an Excel table. Set the table headers accordingly.

Apply Date Filter:
Use the "Filter array" action to filter emails based on the received date falling within the range specified in Cell A1 and B1.

Run the Flow:
Save and run the flow. It will now automatically extract information from the Sent Items folder of the specified email address for emails with attachments and populate the Excel table accordingly.

Make sure to adjust the actions and conditions according to your specific requirements and environment.
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,207
Members
452,618
Latest member
Tam84

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