It seems you need to iterate over all folder recursively because the nesting level is unknown. The following code iterates over all folders in Outlook recursively:
sub ProcessFolders(Folders)
for each folder in Folders
if Folder.DefaultItemType = olMailItem Then
Debug.Print "--------- " & folder.Name
End If
ProcessFolders(folder.Folders)
next
end sub
Here is how you could invoke it:
ProcessFolders(Application.Session.Folders)
The result must show the number of emails in these subfolders and the date of the last email.
The Items.Count property returns a long indicating the count of objects in the specified collection of folder. For example:
folderInstance.Items.Count
To find the date of last email (I suppose the last received one) you need to sort the collection using the Items.Sort method which orts the collection of items by the specified property. The index for the collection is reset to 1 upon completion of this method.
Set myItems = myFolder.Items
myItems.Sort "[ReceivedTime]", True
MsgBox myItems(1).ReceivedTime