title: Modify HTML in a Internet Explorer window using external.menuArguments
body: <p>I've got a VB.NET class that is invoked with a context menu extension in Internet Explorer. </p>
  
  <p>The code has access to the object model of the page, and reading data is not a problem. This is the code of a test function...it changes the status bar text (OK), prints the page HTML (OK), changes the HTML by adding a text and prints again the page HTML (OK, in the second pop-up my added text is in the HTML)</p>
  
  <p>But the Internet Explorer window doesn't show it. Where am I doing wrong?</p>
  
  <pre><code>Public Sub CallingTest(ByRef Source As Object)
      Dim D As mshtml.HTMLDocument = Source.document
      Source.status = "Working..."
      Dim H As String = D.documentElement.innerHTML()
      MsgBox(H)
      D.documentElement.insertAdjacentText("beforeEnd", "ThisIsATest")
      H = D.documentElement.outerHTML()
      MsgBox(H)
      Source.status = ""
  End Sub
  </code></pre>
  
  <p>The function is called like this from JavaScript: </p>
  
  <pre><code>&lt;script&gt;
      var EB = new ActiveXObject("MyObject.MyClass");
      EB.CallingTest(external.menuArguments);
  &lt;/script&gt;
  </code></pre>