title: VBA Groupwise Email
body: <p>I'm using Excel 2013, Windows 7, Groupwise 12.</p>
  
  <p>The code should be pretty straight forward, but I keep getting an error</p>
  
  <blockquote>
    <p>"Active X component can't create object"</p>
  </blockquote>
  
  <p>I've made sure the references are there according to the Groupwise's development documents which is simply their "gwcma1.dll" and I just can't figure out what is going on.</p>
  
  <p>Theory right now is that Groupwise was installed some way that didn't populate the registry information needed for the code to create the object even though it is in the object browser.</p>
  
  <p>Code:</p>
  
  <pre><code>Dim gwAccount As GroupwareTypeLibrary.Account2
  Set gwApp = CreateObject("NovellGroupwareSession")
  </code></pre>
  
  <p>I've used this code for years on older versions of excel and windows and groupwise, and I can't figure out what has changed.</p>
  
  <p>---EDIT---</p>
  
  <p>Here's the beginning part of the code.  After this is just standard loops and logic that all works.</p>
  
  <p>Here's the first part of it.  After this point, it's just standard loops and and logic.</p>
  
  <pre><code>Sub EmailPDFs()
  Dim i, k As Long
  Dim PhysicianCount As Long
  Dim StartPoint As Long
  Dim CurrentNPI As Long
  Dim CurrentEmail As String
  Dim CurrentFileName As String
  Dim CurrentFilePath As String
  Dim CurrentDate As String
  Dim EmailBody As String
  
  'Declaration for Email
  Dim gwMessage As GroupwareTypeLibrary.Message2
  Dim gwAccount As GroupwareTypeLibrary.Account2
  Dim gwApp As GroupwareTypeLibrary.Application
  
  Set gwApp = CreateObject("NovellGroupwareSession")
  Set gwAccount = gwApp.Login()
  </code></pre>
  
  <p>---EDIT 2---</p>
  
  <p>I tried Application2 and still the same error.  I think I was trying the older one and the properties were the same on the object, but Application2 let you do proxy email access which I wasn't worried about.</p>
  
  <p>For creating a new application, I may need a refresh on the syntax but I'm assuming you're suggesting something like:</p>
  
  <pre><code> Dim xlApp as Excel.Application
   Set xlApp = New Excel.Application             'Early Binding
   Set xlApp = CreateObject(“Excel.Application”) 'Late Binding
  </code></pre>