I don't think you can address ReportItem directly from VBA without third party software so the line should be
Code:
If TypeName(Item) = "MailItem" Then
If Item is classed as Object then this should go directly after For Each e.g.
Code:
For Each Item In olSubFolder.Items
If TypeName(Item) = "MailItem" Then
If Item.Attachments.Count > 0 then
'Do stuff