Sub MacroA()
Dim Sh As Worksheet
Dim olApp As Object
Dim r As Long
Dim i As Long
Dim olItem As Object
Set Sh = Worksheets("Sheet1")
Sh.Cells.Clear
Set olApp = GetObject(, "Outlook.Application")
r = 1
With olApp
For i = .Inspectors.Count To 1 Step -1
Set olItem = .Inspectors.Item(i).CurrentItem
Sh.Cells(r, 1).Value = olItem.Subject
Sh.Cells(r, 2).Value = olItem.EntryID
Sh.Cells(r, 3).Value = olItem.Parent.StoreID
.Inspectors.Item(i).Close 0
r = r + 1
Next i
End With
Sh.Cells.EntireColumn.AutoFit
End Sub
Sub MacroB()
Dim Sh As Worksheet
Dim Rng As Range
Dim olApp As Object
Dim olNameSpace As Object
Dim Cell As Range
Set Sh = Worksheets("Sheet1")
Set Rng = Sh.Range("A1").CurrentRegion.Columns(1)
Set olApp = GetObject(, "Outlook.Application")
Set olNameSpace = olApp.GetNameSpace("MAPI")
For Each Cell In Rng.Cells
olNameSpace.GetItemFromID(Cell.Offset(, 1).Value, Cell.Offset(, 2).Value).display
Next Cell
End Sub