title: What is the difference between new ActiveXObject() and WScript.CreateObject()?
body: <p>According to the <a href="https://docs.microsoft.com/en-us/windows/win32/com/using-com-objects-in-windows-script-host" rel="nofollow noreferrer">Microsoft documentation</a>, one can create instances of the COM objects using both the <code>ActiveXObject()</code> and the <code>WScript.CreateObject()</code> functions. It seems like the lines</p>
  <pre><code>var objXL = new ActiveXObject(&quot;Excel.Application&quot;);
  </code></pre>
  <p>and</p>
  <pre><code>var objXL = WScript.CreateObject(&quot;Excel.Application&quot;);
  </code></pre>
  <p>are identical. Is this a true assumption? and if not what is the difference? Examples to show the difference would be highly appreciated.</p>
  <p><strong>P.S.</strong> The post this has been flagged as a duplicate to is about the difference between VBScript's <code>CreateObject()</code> method and JScript's <code>WScript.CreateObject()</code>. It answers mention the JScript's <code>ActiveXObject()</code> constructor with no further elaborations.</p>