2

I'm using Excel 2013, Windows 7, Groupwise 12.

The code should be pretty straight forward, but I keep getting an error

"Active X component can't create object"

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.

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.

Code:

Dim gwAccount As GroupwareTypeLibrary.Account2
Set gwApp = CreateObject("NovellGroupwareSession")

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.

---EDIT---

Here's the beginning part of the code. After this is just standard loops and logic that all works.

Here's the first part of it. After this point, it's just standard loops and and logic.

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()

---EDIT 2---

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.

For creating a new application, I may need a refresh on the syntax but I'm assuming you're suggesting something like:

 Dim xlApp as Excel.Application
 Set xlApp = New Excel.Application             'Early Binding
 Set xlApp = CreateObject(“Excel.Application”) 'Late Binding
uofarob
  • 65
  • 1
  • 12
  • It's not enough to just have the .dll installed, you need to reference it. In the VBA editor, under Tools \ References, do you have selected **GROUPWISE TYPE LIBRARY**? – Parfait Dec 08 '15 at 19:17
  • Yes sir, I have it in my reference with a check box "GroupWare type library" location is C:\Program Files (x86)\Novell\GroupWise\gwcma1.dll – uofarob Dec 08 '15 at 21:54
  • Is this all of your code? Do you declare other objects? – Parfait Dec 08 '15 at 22:07
  • Just added more to the original text – uofarob Dec 09 '15 at 16:49
  • In this library https://www.novell.com/documentation/developer/groupwise_sdk/gwsdk_gwobjapi/data/a7qte4k.html, they reference the application object as application2. Do you not have this version? Also, why don't you just set the application object to a new application? – cronos2546 Dec 09 '15 at 17:13
  • Added another edit as EDIT 2 to the original so I could get the code to display like I wanted, I appreciate your help immensely!!! – uofarob Dec 10 '15 at 13:44

0 Answers0