VBA How to extract the date and time of arrival of a answered email

0 votes

I have a code that I use to extract data from Outlook to Excel. Can I also use this code to extract the date and time that the responded emails arrived?

This is used to track when an email was received, as well as when a response was given.

`Sub ExtraerEnviados()

Dim OutlookApp As Object
Dim ONameSpace As Object
Dim MyFolder As Object
Dim OItem As Object
Dim Fila As Integer

Set OutlookApp = CreateObject("Outlook.Application")
Set ONameSpace = OutlookApp.GetNamespace("MAPI")
'Set MyFolder = ONameSpace.GetDefaultFolder(olFolderInbox)
Set MyFolder = ONameSpace.Folders("xxxxxxxxxxxxxxxxx").Folders("sent items")

Range(Range("A2"), ActiveCell.SpecialCells(xlLastCell)).ClearContents

Fila = 2

For Each OItem In MyFolder.Items
On Error Resume Next


Sheets("sent items").Cells(Fila, 1).Value = OItem.SenderEmailAddress
Sheets("sent items").Cells(Fila, 2).Value = OItem.To
Sheets("sent items").Cells(Fila, 3).Value = OItem.Subject
Sheets("sent items").Cells(Fila, 4).Value = OItem.ReceivedTime--this is for element sent
Sheets("sent items").Cells(Fila, 5).Value = OItem.Categories
Sheets("sent items").Cells(Fila, 6).Value = OItem.<<I want to know when the item arrives in the inbox>>
Fila = Fila + 1

Next OItem

Set OutlookApp = Nothing
Set ONameSpace = Nothing
Set MyFolder = Nothing

End Sub`   

I want you to assist me in finding a solution to this problem or recommend a different approach to this problem, so please let me know when the email arrived in your inbox and when an answer was sent.

Jan 9 in Others by Kithuzzz
• 28,900 points
85 views

1 answer to this question.

0 votes

Use MailItem.ReceivedTime property. I hope this helps you.

answered Jan 9 by narikkadan
• 53,520 points

Related Questions In Others

0 votes
1 answer

How to find the time complexity of a program?

Hi@akhtar, The first loop is O(N) and the ...READ MORE

answered Oct 15, 2020 in Others by MD
• 95,420 points
563 views
0 votes
1 answer
0 votes
1 answer
0 votes
0 answers

how to list the contents of a asset into an event

May 29, 2019 in Others by anonymous
286 views
0 votes
1 answer

Embed picture in outlook mail body excel vba

The image needs to be added and ...READ MORE

answered Dec 16, 2022 in Others by narikkadan
• 53,520 points
275 views
0 votes
1 answer

Error populating email body from word documents

There is no need to use late ...READ MORE

answered Jan 15 in Others by narikkadan
• 53,520 points
39 views
0 votes
1 answer

Retrieve epay.info Balance with VBA and Excel

This code should log you in, provided ...READ MORE

answered Sep 5, 2018 in Blockchain by digger
• 26,740 points
533 views
0 votes
1 answer

How to load file to Excel Power query from SFTP site

Currently, I don't think there is a ...READ MORE

answered Dec 3, 2018 in Power BI by Upasana
• 8,620 points
2,415 views
0 votes
1 answer

VBA How to extract the date and time of arrival of a answered email

Use MailItem.ReceivedTime property. I hope this helps you ...READ MORE

answered Jan 9 in Others by narikkadan
• 53,520 points
42 views
0 votes
1 answer

How to increment the Range of a For Each loop - Excel VBA

Your formula seems to sum 1 single ...READ MORE

answered Jan 7 in Others by narikkadan
• 53,520 points
82 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP