Page 1 of 2 12 LastLast
Results 1 to 20 of 26

Thread: Automate MS Outlook Operations using QTP?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member
    Join Date
    Nov 2007
    Answers
    2

    Automate MS Outlook Operations using QTP?

    Can we automate MS Outlook Operations using QTP? We need to find out automation tools which can automate MS Outlook. Pls help.


  2. #2
    Contributing Member
    Join Date
    Oct 2007
    Answers
    30

    Re: Automate MS Outlook Operations using QTP?

    SendTo=".......@........com"
    SendToCC=".......@........com"
    Subject="QTP mail"
    Body1="This mail is generated from QTP Environment"
    Attachment="C:\Spec.xls"

    Call SendMail(SendTo, Subject, Body1, Attachment)

    Function SendMail(SendTo, Subject, Body, Attachment)
    Set ol=CreateObject("Outlook.Application")
    Set Mail=ol.CreateItem(0)
    'ol.DisplayAlerts = False
    Mail.to=SendTo
    Mail.CC=SendToCC
    Mail.Subject=Subject
    Mail.Body=Body
    If (Attachment <> "") Then
    Mail.Attachments.Add(Attachment)
    End If
    Mail.Send
    ol.Quit
    Set Mail = Nothing
    Set ol = Nothing
    End Function


  3. #3
    Junior Member
    Join Date
    Nov 2007
    Answers
    2

    Re: Automate MS Outlook Operations using QTP?

    Thanks for your response.

    When we try to record action on outlook, QTP records this with coordinates. Do we need to add some libraries ? OR Are we required to add some particular addin to achieve this...

    currently, we are using QTP 8.2 with .Net Addin enabled. Can you please provide few more pointers on this?

    Thanks,
    Kavita


  4. #4
    Junior Member
    Join Date
    Feb 2008
    Answers
    4

    Re: Automate MS Outlook Operations using QTP?

    I have to check 60 notification that are delivered by our application to usr at different events. Each time we will check manually by stoping SMTP and verifying the mails in Pickup folder. Is there any way to read Outlook express emails with file extention .eml and verify the email notifications?


  5. #5
    Junior Member
    Join Date
    Feb 2008
    Answers
    4

    Re: Automate MS Outlook Operations using QTP?

    Set ol=CreateObject("Outlook.Application")
    If i have try to creaet outlook object using above step its giving an error saying ActivX component cannot create object. Andy idea?


  6. #6
    Junior Member
    Join Date
    Dec 2007
    Answers
    24

    Re: Automate MS Outlook Operations using QTP?

    We can automate Outlook using QTP. .net addin should be installed.

    Am working on an application totally automating outlook.... feel free to approach me


  7. #7
    Junior Member
    Join Date
    Dec 2008
    Answers
    2

    Re: Automate MS Outlook Operations using QTP?

    Hi,
    Can you give some idea how to read a mail from outlook express using QTP

    Thanks


  8. #8
    Junior Member
    Join Date
    Jul 2009
    Answers
    5

    Re: Automate MS Outlook Operations using QTP?

    Hi Naga,

    It looks very interesting that you solved automating MS Outlook using QTP. I need your help to start the work. I am pointing out few of my queries below:-

    1. .Net addin is required for Outlook automation?
    2. Is it possible to verify the body contents of the mail?
    3. Do we have maintain a separate mailbox for automation?
    4. Any other requirements you may know that will required for QTP?

    Currently i am using QTP 9.5.


  9. #9
    Junior Member
    Join Date
    Dec 2007
    Answers
    24

    Smile Re: Automate MS Outlook Operations using QTP?

    1. .Net addin is required for Outlook automation?

    Not necessary

    2. Is it possible to verify the body contents of the mail?
    Yes you can verify all the contents of a mail

    3. Do we have maintain a separate mailbox for automation?
    NO

    4. Any other requirements you may know that will required for QTP?
    Default QTP installation is enough to automate Outlook


  10. #10
    Junior Member
    Join Date
    Jul 2009
    Answers
    5

    Re: Automate MS Outlook Operations using QTP?

    Thanks Naga for your reply.

    To be very specific, i want to know how can verify an email i:e the sender,subject,body.

    If you can help me then it would be very kind of you.


  11. #11
    Expert Member
    Join Date
    Apr 2008
    Answers
    1,859

    Re: Automate MS Outlook Operations using QTP?

    hai friend,

    Quote Originally Posted by arijit2111 View Post
    Hi Naga,
    1. .Net addin is required for Outlook automation?
    While installing QTP it asks for addins you can select .Net addin there if needed. I don't think so we need .Net addin for outlook automation.


    Quote Originally Posted by arijit2111 View Post
    Hi Naga,
    2. Is it possible to verify the body contents of the mail?
    Yes it is possible

    Quote Originally Posted by arijit2111 View Post
    Hi Naga,
    3. Do we have maintain a separate mailbox for automation?
    not necessarily

    Quote Originally Posted by arijit2111 View Post
    Hi Naga,
    4. Any other requirements you may know that will required for QTP?
    Please let us know what you are looking for.

    Thanks
    Deepa


  12. #12
    Junior Member
    Join Date
    Jul 2009
    Answers
    5

    Re: Automate MS Outlook Operations using QTP?

    Deepa, thanks for your reply.

    Actually i want verify an email by validating the sender,subject and body. Our system generates an email for an event. So we need to verify the same using QTP.


  13. #13

    Re: Automate MS Outlook Operations using QTP?

    Quote Originally Posted by naga.sd.k View Post
    We can automate Outlook using QTP. .net addin should be installed.

    Am working on an application totally automating outlook.... feel free to approach me
    Hi,

    I have to automate outlook using qtp. I am using qtp 9.5. I have to read each content of an email on outlook like sender content, cc field content, subject content, attachment file name and file content , body content.
    mails will be selected on search criteria.
    I need methods and properties used for accessing outlook objects.
    Please help me regarding this.


  14. #14
    Junior Member
    Join Date
    Jan 2009
    Answers
    4

    Re: Automate MS Outlook Operations using QTP?

    Hi


    Can you please check if you are able to retrieve the body and subject of the unread mails using the below code,

    Set olapp = createobject("outlook.application")
    set inbox = olapp.getnamespace("mapi").folders

    for each fold in inbox
    msgbox fold.name
    getsubfolders(fold)
    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<>"notes" then
    getunreadmails(objfolder)
    end if
    getsubfolders objsubfolder
    next
    end sub


    1) Copy the above script into QTP(any version)
    2) try to Execute the script, it will show the unread mails information(sender, date, body, subject...etc)


    Modify the above code according to your requirement


  15. #15
    Junior Member
    Join Date
    Nov 2009
    Answers
    1

    Re: Automate MS Outlook Operations using QTP?

    Work great! how do you specify to read just one email based on the subject or sender or sent date/time?


  16. #16
    Junior Member
    Join Date
    Dec 2008
    Answers
    1

    Re: Automate MS Outlook Operations using QTP?

    Quote Originally Posted by naga.sd.k View Post
    We can automate Outlook using QTP. .net addin should be installed.

    Am working on an application totally automating outlook.... feel free to approach me
    HI

    I need your help on automating the outlook using QTP 11. we have addin for Outlook and need to automated the outlook application along with our addin. can you please give some tips to recognise the Outlook objects.

    Thanks


  17. #17
    Junior Member
    Join Date
    Dec 2007
    Answers
    24

    Re: Automate MS Outlook Operations using QTP?

    Quote Originally Posted by praburks View Post
    HI

    I need your help on automating the outlook using QTP 11. we have addin for Outlook and need to automated the outlook application along with our addin. can you please give some tips to recognise the Outlook objects.

    Thanks
    Okay. What items do you want to get recognized ?


  18. #18
    Junior Member
    Join Date
    Nov 2011
    Answers
    1

    Re: Automate MS Outlook Operations using QTP?

    Hi,

    There is no need to get the outlook objects recognized to automate outlook. You can use the Outlook Object Model to perform various outlook actions using VBScript/QTP. The below link shows various examples on how we can automate outlook using QTP.


  19. #19
    Junior Member
    Join Date
    Feb 2008
    Answers
    4

    Re: Automate MS Outlook Operations using QTP?

    How we can get .net add-in?


  20. #20
    Expert Member
    Join Date
    Apr 2008
    Answers
    1,859

    Re: Automate MS Outlook Operations using QTP?

    Hai friend,

    Some hints if an email is generated you know to whom you are sending the email so do one thing get all the senders name, subject and so on what ever you want in a datatable and then do a loop.

    This is my assumption let me know how it works out.

    Thanks
    Deepa


Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact