title: How to merge a remote MS Word document with the active document in a VBA macro?
body: <h3>Frontend</h3>
  
  <p>In the "frontend" I have a macro linked to a button in my command bar within Word. Purpose of this button is to allow users to compare the current document with its previous version.</p>
  
  <h3>Backend</h3>
  
  <p>In the backend I have a Java EE server and Alfresco running with a few servlets. One of these servlets currently returns .doc document when given the document's name. So I just need to call it with the good name containing the version I want and it returns me the document I asked for.</p>
  
  <h3>Ideal workflow</h3>
  
  <p>So the ideal workflow for a user would be the following :</p>
  
  <ul>
  <li>User opens a MS Word document </li>
  <li>User clicks on a button in the command bar</li>
  <li>User gets a new document containing a merged version of both its current doc and the
  one returned by the server</li>
  </ul>
  
  <h3>What I want to know</h3>
  
  <p>The challenging part for me is the one regarding VB6. I know that I can merge docs with <code>ActiveDocument.Merge FileName:="path_to_file", MergeTarget:=wdMergeTargetSelected</code> but</p>
  
  <ol>
  <li>How to call a servlet that returns a Word Document that I can use in my VB script?</li>
  <li>How to interpret the result of this call so I can pas it to the Merge function and create my merged document?</li>
  </ol>
  
  <p>Thank you for you help.</p>