-
Releasing .NET Automation Addins for MS Excel
Hi,
I have a question about .NET automation addins for MC Office and Excel in particular. I have created a C# automation addin for Excel by using a COM interop wrapper - along the lines of:
http://blogs.msdn.com/eric_carter/ar...01/273127.aspx
The addin works great. However, my problem appears when I try to release the add-in. In the past I've used XLLs and was able to load and release the addin on the fly by simply unchecking the addin from the tools>add-ins menu. this is really handy when you need to recompile. Unfortunately I don't seem to be able to achieve the same behaviour for my automation addin. Does anyone know how to release/unload?
Any help much appreciated !! Thanks
-
i'm still struggling with this - please please someone help me
-
Try the following:
Include the Excel COM object into your project.
In code:
//Initialize Excel
Excel._Application App;
App = (Excel._Application)System.Runtime.InteropServices.Marshal.GetActiveObject("Excel.Applicat ion");
//do your work
....
//To release Excel
int z;
do
{
z = System.Runtime.InteropServices.Marshal.ReleaseComObject(App);
}
while (z != 0);
App = null;
Similar Threads
-
By Mayank Jindal in forum C++
Replies: 0
Last Post: 12-26-2005, 08:43 AM
-
By Hariharan in forum .NET
Replies: 1
Last Post: 07-05-2005, 08:12 AM
-
Replies: 24
Last Post: 02-28-2003, 03:43 PM
-
By Vikas Garg in forum Careers
Replies: 18
Last Post: 07-13-2002, 11:58 AM
-
By AutomatedQA Corp in forum .NET
Replies: 0
Last Post: 03-20-2002, 05:28 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks