Ask a Question

Windows10 operating system with Oulook2013

Chaste01
Occasional Contributor

Windows10 operating system with Oulook2013

I'm having a problem on Windows10 operating system with Oulook2013.  For your information, I'm also running the exact same code on our Win2012R2 server with Outlook2013 and no problem occurs, everything is working fine.

 

   function isMessageReceived2010(accountName, senderEMail, eMailSubject)

  {

     var OutlookApplication = Sys.OleObject("Outlook.Application");

          var NamespaceMAPI = OutlookApplication.GetNamespace("MAPI");

 

 

In execution, it stops (crashes) at :  var OutlookApplication = Sys.OleObject("Outlook.Application");

Error:  JScript runtime error

Could you please help us out and find a solution to this important problem ?

 

Regards

Stéphane 

10 REPLIES 10
Chaste01
Occasional Contributor

Good news,

 

This is what worked in my situation to resolve this issue, thanks for your help 🙂

 

Step-1

// Ref:   http://winaero.com/blog/how-to-turn-off-and-disable-uac-in-windows-10/


Open Registry Editor
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
Edit Registry key
EnableLUA value and set it to 0


Step-2

Ref : https://support.smartbear.com/viewarticle/9022/

To be modified ONLY for Win10 O/S purpose

function:    function isMessageReceived2010(accountName, senderEMail, eMailSubject)

 

Replace this line of code :
var inbox = NamespaceMAPI.Folders(accountName).Folders("Inbox");

 

By these 2 lines of code :
var mailAcc = NamespaceMAPI.Folders(1);
var inbox = mailAcc.Folders(inboxName);

 

Step-3

Run successfull tests.

cancel
Showing results for 
Search instead for 
Did you mean: