Friends Can someone suggest me how to read email in Outlook using QTP. I was trying to do like this, but it is not showing unread messages.

Set olApp=CreateObject("Outlook.Application")
Set olMAPI=olApp.GetNameSpace("MAPI")
Set oFolder = olMAPI.GetDefaultFolder(6)
Set allEmails = oFolder.Items
unreadCount = 0
For Each email In oFolder.Items
If email.Unread = True Then
MsgBox email.Subject
unreadCount = unreadCount + 1
End If
msgbox unreadCount

Can you please suggest me. Where I am making mistake.

Thanks & Regards,
Robin Tyagi