Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I wanted to automate the process of reading new emails
#1
Solved: 11 Years, 3 Months, 3 Weeks ago Exclamation 
I wanted to automate the process of reading new emails.
But i am not getting the idea how to do this.
Because i am not able to recognise the object of the new incoming mail.

Please help
Reply
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
I think that you have to look for a property which readed mail donĀ“t have and new mails do.

Use the object spy to discover this. Count the number of new mails using descriptive programming, and use a For or similar to read all of them.
Reply
#3
Solved: 11 Years, 3 Months, 3 Weeks ago
Try to use the below code
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


Possibly Related Threads…
Thread Author Replies Views Last Post
  Reading XML Data from a WebPage shaan.mishra87@gmail.com 1 2,209 09-28-2016, 09:16 PM
Last Post: supputuri
  Reading an amount from statement shipu 0 1,909 12-24-2013, 01:42 AM
Last Post: shipu
  reading a value for GIF image sujaravi123 1 2,494 03-29-2012, 07:47 PM
Last Post: Ankesh
  Reading the position (x,y) of a text in WebElement writetoprabha 2 6,475 05-30-2011, 02:08 PM
Last Post: Sathiya
  How to quit running process of QTP? svanmitha 2 6,586 09-22-2010, 06:59 PM
Last Post: supputuri

Forum Jump:


Users browsing this thread: 1 Guest(s)