Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
HF7 Cannot access ComAddin.Object
RussWilmott
I've just installed HF7 and Office Integration code that was previously working has now broken.
I can no longer access the ComAddin.Object. Here is my code where the objCOMAddIn.Object returns Nothing.
Can anyone tell me how I now can access this in HF7?
Private Function GetBaseObjects() As Boolean
'Get Return Value to False by Default
GetBaseObjects = False
'If Word is already open get the current instance
On Error Resume Next
Set objWordApp = GetObject(, "Word.Application")
If objWordApp Is Nothing Then
'Create an instance of the Word.Application object
Set objWordApp = Word.Application
End If
'Retrieve the iManage COM add-in for Office 2000
'from the Word application object.
Set objCOMAddIn = objWordApp.COMAddIns("iManO2K.AddinForWord2000")
'Retrieve the iManage extensibility object
'from the add-in.
Dim n As Integer
For n = 1 To 10
If Not objCOMAddIn.Object Is Nothing Then
Set MyExtObject = objCOMAddIn.Object
Exit For
End If
Next n
On Error GoTo GetBaseError
If MyExtObject Is Nothing Then
MsgBox "Unable to access iManage."
End If
'Get connection mode
lConnectMode = MyExtObject.CurrentMode
If (lConnectMode = nrConnectedMode) Or (lConnectMode = nrPortableMode) Then
'Get the ContextItems collection
Set objContext = MyExtObject.Context
If objContext Is Nothing Then
MsgBox "Error in GetBaseObjects - objWordApp.COMAddIns(iManO2K.AddinForWord2000).object.context is Nothing."
Else
Select Case lConnectMode
Case Is = nrConnectedMode
'Get the NRTDMS and NRTSessions objects
Set objNRTDMS = objContext.Item("NRTDMS")
Set objSessions = objNRTDMS.Sessions
Case Is = nrPortableMode
Set objPortableSession = objContext.Item("PortableNRTSession")
End Select
End If
Else
If objNRTDMS Is Nothing Then
Set objNRTDMS = New IManage.NRTDMS
End If
If objNRTDMS.Sessions.Count < 1 Then
objNRTDMS.Sessions.Add (strIManServer)
End If
objNRTDMS.Sessions(1).TrustedLogin
Set objSessions = objNRTDMS.Sessions
lConnectMode = 0
End If
GetBaseObjects = True
Exit Function
GetBaseError:
MsgBox Err.Description, vbCritical
Err.Clear
End Function
Find more posts tagged with
Comments
guido1
Sounds like the interface for the iManO2k extensibility project must have changed. I remember this happening with the significant changes in HF5. I think I remember this happening in HF7 too, but can't be sure.
You appear to be using VB6: select the "Project | References" menu option, un-check the "Worksite Office2000" reference, and click Ok to commit the references to the project. Then re-select the References menu option, locate the Worksite Office 2000 project, and check it again.
If you're using VBA, obviously navigate to "Tools | References" menu option in the VBIDE, but essentially you do the same thing.
RussWilmott
O.K. , I've fixed it.
Although nothing appeared broken in the VBA References, I removed the Worksite Office2000 Integration reference and reinstalled it.
After a re-compile the problem then went away.
The structure of this dll must have changed.