A responder in the dontnet.languages.
vb forum helped me identify that Excel
and Word were loading v1.1 of the .NET framework instead of v2.
There is a fix for this at:
"Add-ins, smart documents, or smart tags that you create by using Microsoft
Visual Studio 2005 do not run in Office"
http://support.microsoft.com/kb/908002/
My DLL and the demo add-ins worked after installation of this download.
"Steve" wrote:
I am trying to create a DLL in Visual Studio 2005-Visual Basic that contains
custom functions. I believe I need to use COM interop to allow VBA code in
Excel 2002 to access it. I've studied everything I can find on COM Interop
and .NET. I've also tried many of the 'Walkthroughs' on the MSDN site
relating to COM add-ins, .NET and Office XP but am unable to get even these
working in Excel 2002 or Word 2002.
I've installed the Office XP PIA's; I have Office XP SP3 installed; I'm
developing on a Windows XP Pro SP2 system.
Specifically the article, "How To Build an Office COM Add-in by Using Visual
Basic .NET" located at http://support.microsoft.com/kb/302896/, doesn't
function in Excel 2002. It does work in Access 2002 and PowerPoint 2002,
however so I believe the Add-in is being correctly registered in the GAC.
When I start Excel, I get no 'connect' message and no button but excel
starts without error. I get no 'disconnect' message on closing Excel,
either. The behavior is the same in Word. Also, After the Word or Excel
starts, the
"HKEY_CURRENT_USER\Software\Microsoft\Office\[OfficeApp]\Addins\[ProgID]\LoadBehavior"
registry entry changes from a 0x03 to a 0x02. This doesn't happen in Access.
I don't even care about the commandbar buttons for my purposes; I just want
to have access to my custom functions.
Any suggestions?
PS Some of the references I've researched a
INFO: Develop Microsoft Office solutions with Visual Studio .NET
http://support.microsoft.com/kb/311452/EN-US/
Office XP Primary Interop Assemblies Known Issues
http://msdn.microsoft.com/library/de..._piaissues.asp
Walkthrough: Creating COM Objects with Visual Basic 2005
http://msdn2.microsoft.com/en-us/library/x66s8zcd.aspx
COM Interoperability in .NET Framework Applications
http://msdn2.microsoft.com/en-us/library/e7a79b4y.aspx
And many others...