I used this coding in an excel book to find out how many emails I had in each of my subfolders in the INbox.
Sub CountEmails()
Application.ScreenUpdating = False
Dim objApp As Outlook.Application
Dim ns As Outlook.NameSpace
Dim fld As Outlook.MAPIFolder
Dim fldInbox As Outlook.MAPIFolder
Dim mi As Outlook.MailItem
Dim unreadm As Integer, readm As Integer
Set objApp = GetObject(, "Outlook.Application"

Set ns = objApp.GetNamespace("MAPI"

mydate = Date
Set fldInbox = ns.GetDefaultFolder(6)
For Each fld In fldInbox.Folders
unreadm = 0: readm = 0
For Each mi In fld.Items
If mi.UnRead Then
unreadm = unreadm + 1
Else
readm = readm + 1
End If
Next
Sheets("Email Data"

.Select
Range("a1"

.End(xlDown).Offset(1, 0).Select
ActiveCell = fld.Name
ActiveCell.Offset(0, 1).Value = "="
ActiveCell.Offset(0, 2).Activate
ActiveCell = unreadm
ActiveCell.Offset(0, 1).Activate
ActiveCell = readm
Next
End Sub
Thanks Rob.![[yoda] [yoda] [yoda]](/data/assets/smilies/yoda.gif)