SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    May 2007
    Location
    Dublin, OH USA
    Posts
    467
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Closing a new email generated in MS Outlook

    In VB script/ QTP how do you close a new email generated in MS Outlook?

    The reason I am asking is because my new script clicks on links and navigation within our company's website.
    One link is called "Feedback". My script clicks on that to verify that it does exist and that it loads/displays correctly. But I have not been able to find the correct code to close it after it displays.

    I tried the Spy tool, I have tried recording on closing the newly created email, I have even tried to add the object into my OR. One thing I have not tried was low-level recording, but I am hesitant with that.

    Here is the code that I tried to use, but doesn’t work:

    ================================================== ========

    If Window("Message (Rich Text)").WinObject("Message").Exist Then
    msgbox "Went here to close the email."
    Window("Message (Rich Text)").WinObject("Message").Close
    End If

    ================================================== ==========

    Any ideas?

    Thanks,
    SBsteve

  2. #2
    SQA Knight
    Join Date
    Jun 2008
    Posts
    2,555
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: Closing a new email generated in MS Outlook

    Should be Window.Close not Window.WinObject.Close

    But if you still have problems there's always the simple solution, send an alt-f4.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 01:46 AM.

Copyright BetaSoft Inc.