C# Excel Add-in

A

AAsk

[Reposted here ... originally posted in C# General discussions ... no
answers forthcoming there!]

Why does intellisense not alllow me to add:

using Microsoft.Office.Interop.Excel;

after Microsoft.Office, the only option I have is Core.

2. Why does the example at

http://msdn.microsoft.com/en-us/library/ms173189(VS.80,printer).aspx

which compiles ok NOT work with Excel: I am getting a NAME! error.

I am aware that there are two errors in this example:

a. The namespace should be EXCELLADDIN and not TAXTABLES.
b. And, the RegisterFunction method is missing two lines:

Microsoft.Win32.RegistryKey key =
Microsoft.Win32.Registry.ClassesRoot.CreateSubKey(
"CLSID\\{" + t.GUID.ToString().ToUpper() +
"}\\InprocServer32");
key.SetValue("", @"C:\Windows\System32\mscoree.dll");

Adding the lines & compiling produces no errors BUT I cannot get the
TAX
method to work in Excel.

Thanks for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top