title: Unable to get property 'createRange' of undefined or null reference
body: <p>The following code, which worked well right up until I upgraded to windows 8.1 / Internet Explorer 11, is now throwing an error:  "Unable to get property 'createRange' of undefined or null reference"</p>
  
  <pre><code>var SelectedData = window.external.menuArguments.document.selection.createRange().text;
  </code></pre>
  
  <p>Is there a fix / work around for this?</p>
  
  <p><em>*</em> Question updated below with newer code that is still not working .... </p>
  
  <pre><code>&lt;html&gt;&lt;head&gt;&lt;title&gt;-&lt;/title&gt;&lt;script type="text/JScript"&gt;
  function Launch()
  {
  var TheSelection = document.getSelection();
  if(TheSelection != null)
  {
  
  .... do  a bunch of stuff
  
  }
  window.close();
  }
  &lt;/script&gt;&lt;/head&gt;&lt;body onload="Launch();" &lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>I have also tried
  window.getselection;
  window.getselection();
  window.getselection().tostring();</p>
  
  <p>none of these seem to work ...???</p>