Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Issue with Outlook Object
#1
Not Solved
Hi,
I want to expand my sender list in outlook using QTP.suppose i have a friend group named "X" and there are 10 members in that group. I want to expand the group and fetch each and every individuals using QTP. How will i do that?
Reply
#2
Not Solved
Hi Ankur,
how to check and close the all unread mails in outlook for this i tried some code, in this code loop is working fine.but its not reading unread mails and its taken only old mails.Please assist me on this.

My Code is :

Code:
Dim myOlApp,myFolder,strFilter,sTot_UnRed_mails

Set myOlApp = CreateObject("Outlook.Application")

Set myNameSpace = myOlApp.GetNameSpace("MAPI")
On Error Resume Next
Set myFolder=  myNameSpace.GetDefaultFolder(6)
sTot_UnRed_mails= myFolder.UnReadItemCount
'strFilter = "[UnRead] = True"
'Set ObjResMail_Items =ObjMail_Items.Restrict( strFilter )
'ObjResMail_Items.Sort "[UnRead]",True
For i= 1 to sTot_UnRed_mails
    If InStr(myFolder.Subject,sSubject) > 0 Then
        Set oItem = myFolder.Items(i)

        sSubject = oItem.Subject

        sBody = oItem.Body

        Reporter.ReportEvent micPass,"",""&sBody
        myFolder.UnRead = False

    End If
Next


Thanks,
prasad
prasad.vengala@gmail.com
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Flex+Air object identification issue using UFT 11.5 prashantn 0 2,506 02-21-2014, 02:02 PM
Last Post: prashantn
  Security Warning in Outlook automation priyaang 2 3,602 02-19-2014, 01:50 PM
Last Post: priyaang
  Object Identification Issue for Client Server application in QTP 11 Prashanth Kichadi 5 6,165 07-19-2011, 06:23 PM
Last Post: Prashanth Kichadi
  fucntion to send mail in outlook works fine in qtpcode but does not work in .vbs Rashmi 2 3,879 06-13-2011, 09:55 PM
Last Post: byzoor
  Object repository issue while recording. rameshrise3 2 2,627 07-09-2010, 07:17 PM
Last Post: rameshrise3

Forum Jump:


Users browsing this thread: 1 Guest(s)