nianchi111
Board Regular
- Joined
- Aug 24, 2007
- Messages
- 197
- Office Version
- 365
Dear Friends,
I have found a macro in google.
Its extracting all the data from Inbox to excel.
Concern: Unable to get the information of mails Replyed To and Replyed Time.
Please help me !!!!
Code:
Public Sub ReadOutlook()
Dim olApp As Outlook.Application
Dim olNamespace As Outlook.Namespace
Dim olItem As MailItem
Dim i As Integer
Dim b As Integer
Dim olInbox As Outlook.MAPIFolder
Dim olFolder As Outlook.MAPIFolder
Dim lngCol As Long
Set olApp = New Outlook.Application
Set olNamespace = olApp.GetNamespace("MAPI")
Set olInbox = olNamespace.GetDefaultFolder(olFolderInbox)
i = 2
For Each olItem In olInbox.Items
Cells(i, 1) = olItem.SenderName ' Sender
Cells(i, 2) = olItem.Subject ' Subject
Cells(i, 3) = olItem.ReceivedTime ' Received
Cells(i, 4) = olItem.ReceivedByName ' Recepient
Cells(i, 5) = olItem.UnRead ' Unread?
Cells(i, 6) = olItem.ReplyRecipientNames ' RecipientNames
Cells(i, 7) = olItem.SentOn ' Replied Time
i = i + 1
Next
Range("F1").Select
ActiveCell.FormulaR1C1 = "=COUNTA(C[-5])"
Calculate
' subfolders and items within Inbox
Set olInbox = Nothing
Set olNamespace = Nothing
Set olApp = Nothing
End Sub
I have found a macro in google.
Its extracting all the data from Inbox to excel.
Concern: Unable to get the information of mails Replyed To and Replyed Time.
Please help me !!!!
Code:
Public Sub ReadOutlook()
Dim olApp As Outlook.Application
Dim olNamespace As Outlook.Namespace
Dim olItem As MailItem
Dim i As Integer
Dim b As Integer
Dim olInbox As Outlook.MAPIFolder
Dim olFolder As Outlook.MAPIFolder
Dim lngCol As Long
Set olApp = New Outlook.Application
Set olNamespace = olApp.GetNamespace("MAPI")
Set olInbox = olNamespace.GetDefaultFolder(olFolderInbox)
i = 2
For Each olItem In olInbox.Items
Cells(i, 1) = olItem.SenderName ' Sender
Cells(i, 2) = olItem.Subject ' Subject
Cells(i, 3) = olItem.ReceivedTime ' Received
Cells(i, 4) = olItem.ReceivedByName ' Recepient
Cells(i, 5) = olItem.UnRead ' Unread?
Cells(i, 6) = olItem.ReplyRecipientNames ' RecipientNames
Cells(i, 7) = olItem.SentOn ' Replied Time
i = i + 1
Next
Range("F1").Select
ActiveCell.FormulaR1C1 = "=COUNTA(C[-5])"
Calculate
' subfolders and items within Inbox
Set olInbox = Nothing
Set olNamespace = Nothing
Set olApp = Nothing
End Sub
Last edited: