To make it completely like OP has asked.
Code:
Sub Read_Mail()
With CreateObject("Outlook.Application").GetNamespace("MAPI").GetDefaultFolder(6)
ReDim sn(.Items.Count, 3)
j = 0
For Each It In .Items
sn(j, 0) = It.SenderEmailAddress
sn(j, 1) = It.Subject
sn(j, 2) = WorksheetFunction.Text(It.ReceivedTime, "mm/dd/yy h:mm:ss AM/PM")
sn(j, 3) = It.Categories
j = j + 1
Next
End With
With Sheets(1).Cells(1)
.Resize(, 4) = Array("FROM", "SUBJECT", "DATE RECEIVED", "CATEGORIES")
.Offset(1).Resize(UBound(sn) + 1, UBound(sn, 2) + 1) = sn
End With
End Sub
Bookmarks