View Full Version : COM Add-in is "not a valid Office add-in." under Windows 7 64-bit

Eric Frost
02-11-2012, 10:08 AM
Hopefully there is a simple solution for this.

I have a COM Add-in created for MapPoint in VB6 / Windows XP.

When I try to add it under Tool | Com Add-ins in MapPoint on my Win7 64-bit laptop it reports that it is "not a valid Office add-in."

Do I just need to compile it differently i.e. with some different options? Hoping I do not have to port it to VB.NET :1eye:


Eric Frost
02-11-2012, 03:35 PM
The solution was a lot easier than I even hoped.

Actually the error is mis-leading (to me anyway) as it made me think the DLL was somehow not compatible with this operating system, it also happens with Vista, I think both 32 and 64 bit). I never used Vista so had not encountered the problem until Windows 7 64 bit. Note that Win7 32 bit does not have this problem.

I was able to piece this together from posts by Richard Marsden and John Meyer in another thread. Richard says when using an installer, VB6 created DLL's are no problem. John Meyer suggested using > regsvr32.exe at the command line, which is exactly what needed to be done, but this is not the whole story. Actually, just doing this

\> regsvr32 MyAddIn.dll

still gives an error, but if you go to the Start Menu | Accessories and then right-click on "Command Prompt" and select Run As Administrator, then "cd" to the folder with your DLL and then run rgsvr32, this works perfectly. The COM Add-in now shows up in MapPoint.

Hope this helps!

Eric Frost
02-13-2012, 11:47 AM
Just thought I'd add that if you get the error code 0x80004005 it means the Command Prompt was not starting with Run As Administrator.

Make sure you start the Command Prompt by going to the Start Menu, Accessories, and then right-click on the Command Prompt and select Run As Administrator.

hope this helps!