Problem deploying Excel 2003 add-in

Hello,

I successfully created an Excel 2003 add-in using VSTO SE on VS2k5. When I run the app in debug mode, the add-in displays properly within Excel. When I run the installer, the add-in does not appear (even on the same machine as the development environment. I ran the client troubleshooter tool and everything seems to be there. For some reason I can only get the add-in to activate when run in vs2k5 debug mode.

Any help would be appreciated

Thanks,

Richard


Answer this question

Problem deploying Excel 2003 add-in

  • PDCS

    Those tech docs were the trick. Problem solved.!

    Thanks.

  • D--

    I cannot see it on the COM add-in dialog.

    Here is the pertinent code:


    private void ThisAddIn_Startup(object sender, System.EventArgs e)
    {
    try
    {
    #region VSTO generated code

    this.Application = (Excel.Application)Microsoft.Office.Tools.Excel.ExcelLocale1033Proxy.Wrap(typeof(Excel.Application), this.Application);

    #endregion
    InitMenuBarItems("&ICT");
    MenuItem = CreateButton((Office.CommandBarPopup)MenuBarItem, "Reports");
    MenuItem.Click += new Microsoft.Office.Core._CommandBarButtonEvents_ClickEventHandler(MenuItem_Click);
    }
    catch (Exception ex)
    {
    MessageBox.Show(ex.Message, ex.Source, MessageBoxButtons.OK, MessageBoxIcon.Error);
    }
    }

    private void InitMenuBarItems(string Caption)
    {
    try
    {
    MainMenuBar =
    this.Application.CommandBars["Worksheet Menu Bar"];
    MenuBarItem = MainMenuBar.Controls.Add(
    Office.MsoControlType.msoControlPopup,
    Type.Missing, Type.Missing, Type.Missing, true);
    MenuBarItem.Caption = Caption;

    }
    catch (Exception ex)
    {
    MessageBox.Show(ex.Message,
    ex.Source, MessageBoxButtons.OK, MessageBoxIcon.Error);
    }
    }



  • Ed Steele

    looks good. I think the solution is in those docs. Let me take some time and go through them and get back to this thread.

    Thanks for the help so far

    -Richard.

  • hrubesh

    Richard,

    If You open Windows Registry and locate the following entry:

    HKEY_CURRENT_USER\Software\Microsoft\Office\Excel\Addins

    Does the add-in exist there and if so what is the number of the Loadbehavior variable



  • coder2k

    Hi Richard,

    Can You see it in the COM add-in dialog in Excel
    What is the Loadbehavior of the add-in



  • Salvatore Di Fazio

    Richard,

    The value of 3 indicates that the add-in should be loaded at the start of the host application (Excel).

    First You need to remove the present entries etc which is easiest done by right clicking on the project name in the Solution Explorer and select the command 'Clean'. Next right click on the project's setup in the Solution Explorer and chose the 'Install' command.

    Hopefully this will give You a workable way. When testing the add-in on other computers you need to create a CAS entry which will give the add-in full trust status. If not, the solution will not run.

    The following articles are 'must' read and You will find a 'skeleton' manifest for setting up the CAS entry correctly.

    Deploying Visual Studio 2005 Tools for Office Solutions Using Windows Installer (Part 1 of 2)
    Deploying Visual Studio 2005 Tools for Office Solutions Using Windows Installer (Part 2 of 2)

     (I will view the MSDN forums tomorrow again - my local time)



  • dumian

    The add-in does exist there and the LoadBehavior variable has a hex value of 3

  • Problem deploying Excel 2003 add-in