Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8285455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:28:15+00:00 2026-06-08T11:28:15+00:00

VSTO VS2008 SP1 .NET 3.5 Excel 2007 I am a .net noob. I am

  • 0

VSTO
VS2008 SP1
.NET 3.5
Excel 2007

I am a .net noob. I am trying to load an automation addin that is an excel application/automation addin (it is a dll not xla or xll) from within a vsto addin in the ThisAddIn_Startup() method of the vsto addin. From google I got the below solution which is not working.

private void ThisAddIn_Startup(object sender, System.EventArgs e)
{

        Application excel = Globals.ThisAddIn.Application;
        //Also tried without display alerts being set to false
        excel.DisplayAlerts = false;
        foreach (AddIn addin in excel.AddIns)
        {
            if (addin.progID.Equals("MY_ADDIN_PROG_ID"))
            {
                Debug.WriteLine("Addin installed is " + addin.Installed);
                addin.Installed = false;
                Debug.WriteLine("Addin is: " + addin.FullName + ", " + addin.progID);
                Debug.WriteLine("Addin installed is " + addin.Installed);
            }
        }
        AddIn addIn = excel.AddIns.Add("MY_ADDIN_PROG_ID", false);
        addIn.Installed = true;
        excel.DisplayAlerts = true;
        Debug.WriteLine("Addin is: " + addIn.FullName + ", " + addIn.progID);
        Debug.WriteLine("Addin installed is " + addIn.Installed);
        excel.DisplayAlerts = false;
        //OTHER STARTUP CODE
        Debug.WriteLine("Starting up addin!");
}

Note, I can see the addin.installed is being set to false and back to true on startup but when I try to populate worksheet with udfs from the addin I tried to load in a later button_click method, I get #NAME? error. I am at my wits end. Any help will be greatly appreciated.

If I first try to call the udf in excel by typing it in a cell by hand before I call my button click method, the worksheet population works and the udfs get evaluted as expected but this is not ideal.

Also setting installed property to true does not seem to be doing anything as i can still see the udf addin as inactive in excel, it is only if I type it into a cell that it gets activated. Is there anything else I need to do to activate the automation addin in my vsto startup?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T11:28:16+00:00Added an answer on June 8, 2026 at 11:28 am

    Looks like this is a bug specific to VSTO. I converted my addin to a COM addin and was able to use the automation addin from code after that. My team has sent the issue to microsoft so we’ll see what they say.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a VSTO application-addin (not a document-addin) for Excel, and we want to
I have an Excel VSTO AddIn that I moved up to Excel 2007/VS2010 last
I created a VSTO Outlook Addin that uses a library Html2Xhtml.dll (.NET) which calls
In a VSTO Excel addin the code: Dim XMLDoc As XElement = XElement.Load(XMLFile1.xml) generates
VSTO 4.0 / Office 2007 In an Excel document-level automation project, I have a
I have an Excel VSTO Add-in that is not installing on one of my
I am writing a VSTO addin for Word 2007. When the user selects File->New,
I have a VSTO Excel workbook that functions correctly in test. I can deploy
i am using vsto, to work with excel-2007... let's consider i have a matrix
I have a VSTO project targeting Excel. I also have a WinForm application written

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.