E
Emmanuel
Hi,
I want to create an Excel automation add-in using VS.NET C#.
I' ve found only one article written by Govert van Drimmelen:
http://www.codeproject.com/dotnet/excelnetauto.asp
The problem is that although the code is very simple when I try to load the
add-in I get
the error message: "Cannot find add-in 'mscoree.dll'. Delete from list".
I am using VS.NET 2003 and MS Office 2003.
Please help
Emmnauel
===================
Bellow follows the code
===================
using System;
using System.Runtime.InteropServices;
namespace NAddIn
{
[ClassInterface(ClassInterfaceType.AutoDual)]
public class Functions
{
public Functions()
{
}
public double Add2(double v1, double v2)
{
return v1 + v2;
}
[ComRegisterFunctionAttribute]
public static void RegisterFunction(Type t)
{
Microsoft.Win32.Registry.ClassesRoot.CreateSubKey(
"CLSID\\{" + t.GUID.ToString().ToUpper() +
"}\\Programmable");
}
[ComUnregisterFunctionAttribute]
public static void UnregisterFunction(Type t)
{
Microsoft.Win32.Registry.ClassesRoot.DeleteSubKey(
"CLSID\\{" + t.GUID.ToString().ToUpper() +
"}\\Programmable");
}
}
}
I want to create an Excel automation add-in using VS.NET C#.
I' ve found only one article written by Govert van Drimmelen:
http://www.codeproject.com/dotnet/excelnetauto.asp
The problem is that although the code is very simple when I try to load the
add-in I get
the error message: "Cannot find add-in 'mscoree.dll'. Delete from list".
I am using VS.NET 2003 and MS Office 2003.
Please help
Emmnauel
===================
Bellow follows the code
===================
using System;
using System.Runtime.InteropServices;
namespace NAddIn
{
[ClassInterface(ClassInterfaceType.AutoDual)]
public class Functions
{
public Functions()
{
}
public double Add2(double v1, double v2)
{
return v1 + v2;
}
[ComRegisterFunctionAttribute]
public static void RegisterFunction(Type t)
{
Microsoft.Win32.Registry.ClassesRoot.CreateSubKey(
"CLSID\\{" + t.GUID.ToString().ToUpper() +
"}\\Programmable");
}
[ComUnregisterFunctionAttribute]
public static void UnregisterFunction(Type t)
{
Microsoft.Win32.Registry.ClassesRoot.DeleteSubKey(
"CLSID\\{" + t.GUID.ToString().ToUpper() +
"}\\Programmable");
}
}
}