title: Error on the creation of ActiveXObject("Outlook.Application ") in web worker
body: <p>I have a simple HTML file and a couple of <code>JS</code> files which perform async operation using web worker. I need to create <code>ActiveX</code> object for Outlook in order to get the Outlook Object Model functionality to retrieve a large set of Outlook tasks. I create <code>ActiveXObject</code> ("Outlook.Application") in web worker <code>JS</code> file. But when I browse my HTML file through <code>IE10</code> I'm getting <code>Automation server can't create object</code> on the <code>ActiveXObject</code> creation step.</p>
  
  <p>As far as I know this error is about Internet Security settings. So I enabled <code>ActiveX</code> and set <code>Enable for Initializing and Script ActiveX controls not marked as safe</code> under the <code>ActiveX</code> controls and plug-ins in <code>IE</code>. But it doesn't help. The interactions in <code>JS</code> files are OK as I checked the work without using <code>ActiveX</code>.  </p>
  
  <p>Could you please advise how to resolve it and if it's possible to use <code>ActiveX</code> with web worker?</p>
  
  <p>Thank you in advance.</p>
  
  <p>Here is the HTML and scripts  </p>
  
  <p><strong>index.html</strong></p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;script src="my_script.js" type="text/javascript"&gt;&lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;input type="button" onclick="javascript:showTasksCount();" value="Show Tasks count" /&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>my_script.js</strong></p>
  
  <pre><code>function display(count) {
          alert("Number of tasks: " + count);
  }
  
  function showTasksCount() {
      var myWorker = new Worker("web_worker.js");
  
      myWorker.onmessage = function (oEvent) {
          display(oEvent.data);
      };
  
      myWorker.postMessage("");
  }
  </code></pre>
  
  <p>and</p>
  
  <p><strong>web_worker.js</strong></p>
  
  <pre><code>onmessage = function (oEvent) {  
      var outlook = new ActiveXObject("Outlook.Application");
  
      var count = outlook.GetNamespace("MAPI").Folders(1).Folders("Tasks").Items.Count;
      postMessage(count);
  };  
  </code></pre>