I have developed a VB application that uses OLE Automation to do several Lotus Notes archiving activities. It runs fine on our developments PCs. When running it on Client PC, option dialogue window appears fine, when we come to create a Notes.NotesSession object, it produces error ‘ActiveX Component can’t create object’.
The VB application is using OLE Automation to perform several archiving activities, some of these activities
use Notes Front end classes (e.g. Open NotesUIDocument and NotesUIWorkSpace).
The Client PCs are imaged, We have no control over the image (i.e. we cannot reinstall Notes). Client PCs have
Lotus Notes Client (Version 6.0.1) installed, NO Designer or Admin Clients.
The code snipnet (VB 6) is as follows:
Public Session As Object
Public ws As Object
Public custDb As Object
Public TransferOptions As Integer
Public DatabaseName As String
function ExportMessage(dbName$)
Dim serverName$, DbReplicaID$, lookupViewName$, DbPathName$
Dim db As Object, parentDoc As Object
On Error GoTo HandleExportOpenMessageErr
DatabaseName = dbName$
serverName = GetServerName(dbName$) ' this returns Server preferred by user
DbPathName = GetPathName(dbName$) ' this returns full Db pathname
Set Session = CreateObject("Notes.NotesSession")
Set ws = CreateObject("Notes.NotesUIWorkspace")
Set custDb = Session.GETDATABASE(serverName, DbPathName, False)
If custDb Is Nothing Then
MsgBox "Unable to Open database " & DbPathName & " - On Server " & serverName & Chr$(13) & _
"Check that the Server Name and Db Path are correctly specified in Setup Server Path Option"
Exit Function
End If
End Fuction
Comparing the registry of the Client Pc and our Development Pc. The Client PC has no entries for the following classes.
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID{29131401-2EED-1069-BF5D-00DD011186B7}
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID{29131502-2EED-1069-BF5D-00DD011186B7}
Key Name: HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID{29131401-2EED-1069-BF5D-00DD011186B7}
Value Data: Notes R4.0 NotesSession
Key Name: HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID{29131401-2EED-1069-BF5D-00DD011186B7}\LocalServer
Value Data: C:\Program Files\lotus\notesR6\notes.exe /Automation
Key Name: HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID{29131401-2EED-1069-BF5D-00DD011186B7}\LocalServer32
Value Data: C:\Program Files\lotus\notesR6\notes.exe /Automation
Key Name: HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID{29131401-2EED-1069-BF5D-00DD011186B7}\ProgID
Value Data: Notes.NotesSession
Key Name: HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID{29131502-2EED-1069-BF5D-00DD011186B7}
Value Data: Notes R4.0 NotesUIWorkspace
Key Name: HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID{29131502-2EED-1069-BF5D-00DD011186B7}\LocalServer
Value Data: C:\Program Files\lotus\notesR6\notes.exe /Automation
Key Name: HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID{29131502-2EED-1069-BF5D-00DD011186B7}\LocalServer32
Value Data: C:\Program Files\lotus\notesR6\notes.exe /Automation
Key Name: HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID{29131502-2EED-1069-BF5D-00DD011186B7}\ProgID
Value Data: Notes.NotesUIWorkspace
CLSID class {29131401-2EED-1069-BF5D-00DD011186B7} and {29131502-2EED-1069-BF5D-00DD011186B7} are missing from the Client PC.
Any idea why these are missing.
I have recreated these entries on the Client PC using .reg file, now the REgistry entries are identical. I still get the same error.
I have tried registering nlsxbe.dll via regsvr32 nlsxbe.dll
Any idea what the problem is and how I can overcome it. Thanks in advance.
Arshad