Registry problems with Word addin

Add-in Express™ Support Service
That's what is more important than anything else

Registry problems with Word addin
 
Joe Zuffoletto




Posts: 21
Joined: 2005-11-07
Last month I opened the sample Word addin project that comes with your .NET product and experimented with it on my home computer. The AddinModule class of this project has these characteristics:

GuidAttribute: dc20bef8-468f-4534-b24b-882ba6adcff3
ProgId: MyFirstAddIn.AddinModule

This month I started my own brand new project at work, then brought it home so I could work on it this weekend. The AddinModule class of this project has these characteristics:

GuidAttribute: F20B0812-4856-4A04-800A-A4B940C8B390
ProgId: MyFirstAddIn.AddinModule

I unregistered the sample addin, then physically removed it from my computer. Then I did a clean build of the second addin and registered it with Temporary = false. The command bar appears in Word, but none of its controls do. In RegEdit I see the following:

Word
Addins
MyFirstAddin.AddinModule
CommandBars
dc20bef8-468f-4534-b24b-882ba6adcff3
Controls
<GUIDs of my 6 controls>

Notice the GUID of the CommandBar is the same as the sample that I unregistered and deleted from my computer. Yet the GUIDs of the 6 controls are correct. If I change the CommandBar GUID in RegEdit to that of my "real" project, everything works.

What's going on here? Why isn't the GUID of my "real" AddinModule getting registered?

I'm using the .NET version of your non-VS2005 product with VS7.

Thanks - Joe
Posted 20 Nov, 2005 14:19:08 Top
Sergey Grischenko


Add-in Express team


Posts: 7224
Joined: 2004-07-05
Hi Joe.

You shouldn't change the GUIDs of command bars and their controls manually in the system registry. These GUIDs are required for ADX. To unregister the add-in you had to use the 'Unregister ADX Project' in VS.
If you unregister an add-in manually, you need to remove the HKEY_CURRENT_USER\Software\Microsoft\Office\Word\Addins\<an add-in ProgId> key with all GUIDs manually too.
Then a new add-in will create all necessary registry keys again after it has been loaded.

What's going on here? Why isn't the GUID of my "real" AddinModule getting registered?

You can change GUIDs of command bars in the InitializeComponent method of the addinmodule. As for controls, all ADX controls have the Edit button in the ControlTag property. You can click this button to change the GUID.
Posted 21 Nov, 2005 06:44:05 Top