Please ensure to include your code between [code][/code] tags while asking or replying to questions.

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

QTP Code to check received emails in outlook

01-27-2010, 02:10 PM
Post: #1
Solved: 8 Months, 6 Days, 10 Hours, 30 Minutes, 5 Seconds ago QTP Code to check received emails in outlook
Hi All,

Can any body tell me code to check whether particular email notification is received in outlook or not in QTP.

Regards,
Ritu
Find all posts by this user
Quote this message in a reply
01-27-2010, 02:53 PM
Post: #2
Solved: 8 Months, 6 Days, 10 Hours, 30 Minutes, 5 Seconds ago RE: QTP Code to check received emails in outlook
Try this
Code:
Set OlApp = CreateObject("Outlook.Application")
Set Inbox = OlApp.GetNamespace("Mapi").GetDefaultFolder(olFolderInbox)

Set InboxItems = Inbox.Items

For Each Mail In InboxItems
    If Mail.UnRead Then
    ...
    End If
Next

hope this helps

Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Security Warning in Outlook automation priyaang 2 151 02-19-2014 01:50 PM
Last Post: priyaang
  QTP with EMMA Code Coverage Tool Sdhar 2 1,579 09-23-2011 05:59 AM
Last Post: Sdhar
  Code to export and import tests in qtp tpragnya 0 1,117 08-17-2011 08:06 PM
Last Post: tpragnya
  fucntion to send mail in outlook works fine in qtpcode but does not work in .vbs Rashmi 2 1,635 06-13-2011 09:55 PM
Last Post: byzoor
  Issue with Outlook Object somu175734 1 722 01-08-2009 04:25 PM
Last Post: prasad.vengala



User(s) browsing this thread: 1 Guest(s)