title: Running Word from a SharePoint Workflow
body: <p>based on <a href="https://stackoverflow.com/questions/630449/join-ms-word-documents">Join MS Word documents</a> I have made a console application that splices multiple word files into one. Now I want to do the same from a Workflow in SharePoint. In short, my code before it fails looks like this:</p>
  
  <pre><code>object oMissing = System.Reflection.Missing.Value;
  Microsoft.Office.Interop.Word.ApplicationClass oWord = new Microsoft.Office.Interop.Word.ApplicationClass();
  Microsoft.Office.Interop.Word._Document oDoc = null;
  oWord.Visible = false;
  Microsoft.Office.Interop.Word.Documents oDocs = oWord.Documents;
  object oFile = tmpFileName;
  oDoc = oDocs.Add(ref oMissing, ref oMissing, ref oMissing, ref oMissing);
  oDoc.Activate();
  </code></pre>
  
  <p>When I reach oDoc.Activate(), I'm thrown the following exception, even though I only have one instance of the workflow running and no other instances of Word is running on the server:</p>
  
  <p>The message filter indicated that the application is busy. (Exception from HRESULT: 0x8001010A (RPC_E_SERVERCALL_RETRYLATER))</p>
  
  <p>Why do I get this error?? What would make the application busy?</p>
  
  <p>Cheers</p>
  
  <p>Nik</p>