01-04-2010, 02:05 PM
Hi Sreekanth ,
When i am trying to use ur code
Error :Expected EndIf statement is poping up on my qtp screen
When i am trying to use ur code
Code:
Set olApp = CreateObject("Microsoft.Outlook")
Set olns = olApp.GetNameSpace("MAPI")
Set objFolder = olns.GetDefaultFolder(2)
For each item in objFolder.Items
If item.Unread Then
msgbox item.body
EndIf
Next
Error :Expected EndIf statement is poping up on my qtp screen