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
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.