0

Trying to programmatically automate IBM PCOMM v 14.0 using Host Access Class Library Automation Objects in VBScript through Visual Studio Code IDE:

Option Explicit
Dim autECLPSObj 
Dim autECLConnList
Dim autECLOIAObj

Dim PSText

Set autECLPSObj = CreateObject("PCOMM.autECLPS")
Set autECLConnList = CreateObject("PCOMM.autECLConnList")
Set autECLOIAObj = CreateObject("PCOMM.autECLOIA")

' Refresh must be called to get latest connection info
autECLConnList.Refresh
' Initialize the connection with the first in the list
autECLPSObj.SetConnectionByHandle (autECLConnList(1).Handle)
' Initialize the connection with Session Name
autECLOIAObj.SetConnectionByName ("A")

        autECLPSObj.SendKeys "PCOMM API’s are very Powerful", 3, 1
        'autECLPSObj.SendKeys “[Enter]”
        'PSText = GetText(1, 1, 10)
        'autECLPSObj.SetCursorPos 2, 1
        autECLOIAObj.WaitForInputReady (10000)
    Set autECLPSObj = Nothing
    Set autECLConnList = Nothing
    Set autECLOIAObj = Nothing

Getting the following error: Microsoft VBScript runtime error: ActiveX component can't create object: 'PCOMM.autECLPS'

The PCOMM documentation says Automation will work only using 64-bit version of MS Office.

My current installed versions are:

  1. Office version is 'Microsoft 365 MSO 64-bit'
  2. Windows OS: Windows 10 Enterprise (64-bit)
  3. IBM Personal Communications (PCOMM) version 14.0

Clarification:

  1. Is the above error due to bit incompatibility? Based on product readme file,I suppose the PCOMM 14.0 is 64 bit version
  2. How do I determine whether it is 64-bit or 32-bit PCOMM installed?
  3. I'm not clear whether the Office version and Windows OS should be downgraded to 32 bit version?
user692942
  • 16,398
  • 7
  • 76
  • 175
Sai
  • 309
  • 1
  • 4
  • 15
  • 1
    Recommend going through [this checklist](https://stackoverflow.com/a/35985827/692942) to help diagnose how / where the COM DLL is registered. – user692942 May 30 '22 at 18:57
  • 1
    The documentation you link to says it 32 bit not 64 bit. Therefore use a 32 bit client or force the dll to be loaded in dllhost.exe. Exe files don't care about bitness. https://learn.microsoft.com/en-us/windows/win32/com/dllsurrogate. You tagged this VBScript - there are 32 bit vbscript in `C:\Windows\SysWOW64` – user18521918 May 30 '22 at 20:12
  • 1
    Does this answer your question? [Error ASP 0177: 8007007e CreateObject fails for COM DLL](https://stackoverflow.com/questions/35976543/error-asp-0177-8007007e-createobject-fails-for-com-dll) – user692942 May 30 '22 at 23:17
  • @user692942 your answer was highly informative as I got know the indepth details on dll / registry works. In this case I verified the dll were indeed registered properly – Sai Jul 07 '22 at 22:19
  • 1
    @user18521918 I thought this was a 64 bit application then realized its 32-bit. When I ran the code again in 32 bit vbscript , it seems to work – Sai Jul 07 '22 at 22:22

0 Answers0