Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP:How to find an email with a subject line in MS outlook and then click on an link
#4
Not Solved
Try to use the below code.I think this will solve your problem
Code:
Set olapp = createobject("outlook.application")
set inbox = olapp.getnamespace("mapi").folders

for each fold in inbox
    msgbox fold.name
    If fold.name = "Give The main Folder name" Then
        getsubfolders(fold)
    End If
    
next

    msgbox inbox.count
    sub getunreadmails(objfolder)

        set col = objfolder.items
    
        for each mail in col
            if mail.unread then
                msgbox mail.subject
                msgbox mail.sendername
                msgbox mail.body
                msgbox mail.senton
                mail.unread=false
            end if
        next

    end sub
    sub getsubfolders(objparentfolder)
        set colfolders = objparentfolder.folders
        for each objfolder in colfolders
            set objsubfolder = objparentfolder.folders(objfolder.name)
            if objfolder.name="Give the Sub Folder Name" then
                getunreadmails(objfolder)
            end if
            getsubfolders objsubfolder
        next
    end sub
Reply


Messages In This Thread
RE: QTP:How to find an email with a subject line in MS outlook and then click on an link - by Arun Prakash - 08-19-2010, 11:00 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Extracting Email Body from Outlook waseem.khan.91 0 1,913 03-04-2019, 02:53 PM
Last Post: waseem.khan.91
  Extracting Email Body from Outlook waseem.khan.91 0 1,035 03-01-2019, 02:51 PM
Last Post: waseem.khan.91
  Find the email using subject with the help of vb script Raheem Shaik 0 1,466 12-12-2018, 02:57 PM
Last Post: Raheem Shaik
  How to catch the script execution when QTP scripts are executed from command line Sreeni.lutukurthy 0 2,696 03-19-2015, 05:55 PM
Last Post: Sreeni.lutukurthy
  how to randomly Select any category link and randomly click on one of its options ? sharavan 0 2,827 11-18-2014, 12:24 AM
Last Post: sharavan

Forum Jump:


Users browsing this thread: 1 Guest(s)