I wrote a program in Excel 2010 to sift through emails in a selected Outlook 2010 folder, and pull in information from the email (html) body.
I updated to Office 2016. S
Avoid using multiple dot notation and check if you really have a MailItem
object (you can also have ReportItem
or MeetingItem
):
set items = FormFolder.Items
For i = 1 To items.Count
set item = items.Item(i)
if item.Class = 43 Then
Range("A2").Select
ActiveCell.Value = item.Subject
ActiveCell.Offset(0, 1).Value = item.To
End If
set item = Nothing
next
set items = Nothing