infrequent grumblings of a software engineer and then some… (also some Delphi programming)

Posts Tagged ‘multiuser’

Changing an Office add-in’s load behaviour in multi-user environments

Posted by tier777 on 2009-12-11

Let’s say you have bought or downloaded some third-party Office COM-addin to use on your Citrix- or Terminal Server. Many of these will by default install for all users. What if for one reason or another you only want to let a subset of your users work with that addin? Well, here’s what:

Office determines what addins to load by looking at the entries below the following two registry keys:



(where OfficeApp should be replaced with Outlook, Word, Excel, etc.)

The sub-entries will be named after the addin’s ProgID, e.g. “Microsoft.VbaAddinForOutlook.1” is one included by default with most versions of Office. From the name it should typically be fairly obvious which entry belongs to the particular addin that you’re after. For the purpose discussed here it is irrelevant what values these sub-entries actually contain.

As you may have guessed the entries under HKLM define which addins get loaded for all users while the entries under HKCU define the ones that should be loaded for that user only. Thus, in order to change an addin’s load behaviour from “all users” to “some users” all you have to do is essentially move the relevant entry from HKLM to HKCU, e.g. by exporting the entry into a .reg-file and then deleting it, then using notepad to change the hive to HKEY_CURRENT_USER and finally re-import that .reg-file again for the users that should use the addin (or just use a group policy object). Remember that you will have to repeat this whenever you install an update of the addin in question as that will probably rewrite the entry under HKLM.

More details about addin registration from a developer’s point of view can be found on MSDN:

Registry Entries for Application-Level Add-ins
(You can disregard the note about registration for all users being ignored in that article as that only applies to VSTO-addins, not to COM-addins)

Posted in Outlook, Tips and Tricks | Tagged: , , , , , , , | Leave a Comment »