Forum Discussion
kavitharaj
10 years agoNew Contributor
Hi
I am writing almost same kind of code to access outlook emails. But where I declare the outlook ole object, test complete fails as server execution failed. Its the very initial step in my script
I am using python
outlookapp = Sys.OleObject["Outlook.Application"]
Any help?
kevin_kapell
7 years agoFrequent Contributor
I found that I cannot make the connection if outlook is alreeady running. So I added the following before making the connection.
var OutLookProcess = Sys.WaitProcess("outlook",2000);
if(OutLookProcess.Exists)
{
OutLookProcess.Terminate();
aqUtils.Delay(2000);//Give time to close Outlook
}
else
{
Log.Event("Outlook does not appear to be running");
}