title: Run Macro of invisible Word Application
body: <p>My problem is that I am trying to execute a function that is located in a Word document. The Word application is not visible. If the application is made visible just before and invisible right after the command, ".Application.Run "GenerateQRCode", wordDocument" works as expected. But it should work without the document or application being visible. If I run it without making the application visible this message appears: Object does not support this property or method. 
  Code that works:</p>
  
  <pre><code>'Creates a document from a template which is not visible
  wordDocument=WordMod.Application.Documents.Add (documentTemplatePath, , _
                  WdNewDocumentType.wdNewBlankDocument, showWord)
  wordDocument.Application.Visible = True
  WordMod.Application.Run "GenerateQRCode", wordDocument
  wordDocument.Application.Visible = False
  </code></pre>
  
  <p>Code that not works:</p>
  
  <pre><code>wordDocument.Application.Visible = False
  WordMod.Application.Run "GenerateQRCode", wordDocument
  </code></pre>
  
  <p>When the application is not visible it does not work with the ".Run" how can i fix it? </p>