Autonomy recently released WorkSite 8.5 SP3 Update 1, which includes updated integration for Office 2007 and 2010. The integration, so far, is much better than the old version.
The only problem is that it kills all your code that used the old iManOXP.dll (iManO2K.iManageExtensibility) but don’t worry, it’s easy to update your code to get it running.
I’ll walk through updating a Word template (VBA), but the same general principles apply to VB6 or VB.Net.
- Firstly, open your custom Word template, go to the VBA editor and remove the reference to “WorkSite Office2000 Integration”. Add a new reference to “WorkSite Integration Interfaces Library”.
- Now change all your objects that use the old iManO2K.iManageExtensibilty object and point instead to WorkSiteAddinInterfaces.iManageExtensibility (you could just do a search through the entire project for iManO2K.iMan and replace with WorkSiteAddinInterfaces.iMan to save hunting around)
For example:
Private WithEvents objWorkSite As iManO2K.iManageExtensibility
becomes
Private WithEvents objWorkSite As WorkSiteAddinInterfaces.iManageExtensibility
- Then change the name used for the WorkSite COMAddin from either “iManO2K.AddinForWord2000” if you’re coming from Word 2003, or “oUTR02K.Connect” for Word 2007/2010 to “WorkSiteOffice2007Addins.Connect”.
For example:
Set objWorkSite = Application.COMAddIns(“iManO2K.AddinForWord2000”).Object
or
Set objWorkSite = Application.COMAddIns(“oUTR02K.Connect”).Object
becomes
Set objWorkSite = Application.COMAddIns(“WorkSiteOffice2007Addins.Connect”).Object
- Next you need to update the parameters of any of the events that use the type Object, and change them to use the type Variant instead.
For example:
Private Sub objWorkSite_DocumentBeforePrint(ByVal Doc As Object, IgnoreIManagePrint As Boolean, Cancel As Boolean)
becomes
Private Sub objWorkSite_DocumentBeforePrint(ByVal Doc As Variant, IgnoreIManagePrint As Boolean, Cancel As Boolean)
You shouldn’t need to change the code within any of those subs.
And that should be it – with any luck your addins and templates will start working again. I guess I better get cracking updating all our other apps, addins and code. Keep you posted on what else I discover.
Update on Monday, July 4, 2011 at 10:16PM
Turns out that the members of the ConnectionMode enumerated type have changed slightly – they’ve been prefixed with ConnectionMode_.
So if you’re checking the connection mode of WorkSite, then you’d change the code from
If objWorkSite.CurrentMode = nrindeterminatemode Then objWorkSite.Connect
to
If objWorkSite.CurrentMode = ConnectionMode_nrindeterminatemode Then objWorkSite.Connect
Update on Wednesday, June 27, 2012 at 4:18PM
As of WorkSite 8.5 SP3 Update 5, the Office Integration is backwards compatible, so there’s no need to do any of this updating, your code should now just work. So forget about the other versions and go straight to Update 5 and newer.