sorry I cannot post the snapshot of my error
btw here's my code, im not sure if this is correct
' Requires Tools-->References-->Microsoft Outlook 15.0 Object Library
Sub getEmails()
Dim olApp As Outlook.Application
Dim olNS As Outlook.Namespace
Dim olFldr As Outlook.MAPIFolder
Dim olItem As Object
Dim olMailItem As Outlook.MailItem
Dim ws As Worksheet
Dim iRow As Long
Dim hdr As Variant
Set ws = ThisWorkbook.Worksheets("Sheet1")
Set olApp = New Outlook.Application
Set olNS = olApp.GetNamespace("MAPI")
Set olFldr = olNS.Folders("
vcmaster@company.com")
Set olFldr = olFldr.Folders("Inbox")
Set olFldr = olFldr.Folders("J-VALSUPPORTING DOCS")
Set olFldr = olFldr.Folders("MANUAL TOUCHES")
ws.Cells.Clear
iRow = 2
Application.ScreenUpdating = False
For Each olItem In olFldr.Items
If olItem.Class = olMail Then
Set olMailItem = olItem
With olMailItem
ws.Cells(iRow, "A") = .Sender
ws.Cells(iRow, "B") = .SenderEmailAddress
ws.Cells(iRow, "C") = .SenderName
ws.Cells(iRow, "D") = .Subject
ws.Cells(iRow, "E") = .ReceivedTime
ws.Cells(iRow, "F") = .Categories
ws.Cells(iRow, "G") = .TaskCompletedDate
ws.Cells(iRow, "H") = olFldr.Name
iRow = iRow + 1
End With
End If
Next olItem
With ws
hdr = Array("Sender", "SenderEmailAddress", "SenderName", "Subject", "ReceicedTime", "Categories", "TaskCompletedDate", "Folder")
.Range("A1").Resize(, UBound(hdr)) = hdr
.Columns.AutoFit
End With
Application.ScreenUpdating = False
End Sub