TRIM Outlook Add-In Module Not Found

Another HP TRIM Outlook issue; this time when trying to check-in a mail item from Outlook, when the TRIM record type has an External Link associated with it – in this case a Generic AddIn (.NET). When the Outlook Add-In gets to the point that it is checking the file in to TRIM the error The specified module could not be found. (Exception from HRESULT: 0x8007007E) is thrown, but only if there is an AddIn associated with the record type of the record being created, otherwise it works fine.

As with most error messages, this one is not very helpful, simply indicating that a module could not be found. Fortunately this was working on my local workstation, however, the issue was present for test users on their thin client environment, so it was just a matter of finding out what was different between the two environments. After some investigating, I remembered that I had manually added the TRIM client installation directory to the PATH system variable to enable running a web site which uses the HP TRIM SDK. Removing the installation dir from the PATH variable did indeed result in the same error message, and funny enough adding the dir back resolved the issue, on both my local instance and on the thin client instance. I don’t know why the TRIM client install doesn’t just add the TRIM directory to the PATH variable by default. Oversight by HP? I’m sure it used to be… there are also plenty of SDK related forum posts suggesting to add it when starting your application (that doesn’t really help in this instance).

To add the TRIM installation directory to your PATH system variable go to your system settings; (start » type “Edit the system environment variables”) or (start » right-click Computer » Properties » Advanced system settings) » Environment Variables » under System variables locate and select Path » click Edit » append your TRIM install folder (default TRIM installation directory should be either; C:/Program Files/Hewlett Packard/HP TRIM or; C:/Program Files (x86)/Hewlett Packard/HP TRIM depending on your installation preference.

TRIM Microsoft Word Add-In HP TRIM SDK Not Found

If you’re using the Microsoft Word integration feature with HP TRIM and receive the error message “Could not load file or assembly ‘HP.HPTRIM.SDK’ or one of its dependencies. The system cannot find the file specified.” chances are you probably have a generic .NET Add-In registered in your TRIM dataset for the record type you’re trying to save your Word document as.

To solve the issue you can copy the HP.HPTRIM.SDK.dll from your Trim installation folder into your Microsoft Office executable folder (e.g. C:/Program Files (x86)/Microsoft Office/Office14 or C:/Program Files/Microsoft Office/Office14 *note your office version may vary e.g. Office11, Office15, etc).

There may be another way to resolve this issue, but so far it’s the easiest and only fix I have worked out.

Evolution of Code

Wriju Ghosh has written an interesting entry which shows the progression of .NET. The article takes a generic list and shows the old and new ways of being able to extract and display the even numbers of a generic list. Starting with a more commonly used for-each statement, Ghosh goes on to show how to achieve the same result using delegates, anonymous methods, Lambda Expressions, and finally LINQ.