none
VSTO - Excel 2007 application does not work with Excel 2010 RRS feed

Answers

  • Finally figured it out. In excel, they have this option to enable 'Trust access to the VBA project object model'. It was disabled in the excel 2010 on the machines where it was not working.

    Go to  File > Excel options (or Options) > Trust Center > Trust Center Settings > Macro Settings

    There you should see 'Trust access to the VBA project object model' check box under 'Developer Macro Settings'. Check it and press ok.

    Enabling this option got rid of the above error for us.

    • Marked as answer by V. K Thursday, May 19, 2011 1:21 PM
    Thursday, May 19, 2011 1:20 PM

All replies

  • Hello,

    If your solutions target 3.5, then you will have to install either directly or through your setup process, the .NET Framework 3.5 on the target machines. Then, you will want to install the "Office extensions for the .NET Framework 3.5". You can install those extensions by installing the Visual Studio 2010 Tools for Office Runtime redistributable after you install the .NET Framework 3.5 on the target machine. For more information about this, see this article - Visual Studio Tools for Office Runtime Installation Scenarios. For information about how to install the runtime, see How to: Install the Visual Studio Tools for Office Runtime Redistributable.

    If your target machines can only have .NET Framework 4.0 (for whatever reason), you could retarget your solution for the .NET Framework 4.0 and the deploy that. However, you will have to perform some tasks manually to retarget successfully. You can read more about how to do that here - Updating Excel and Word Projects that You Migrate to the .NET Framework 4.

    Here is also a cool article about the runtimes VSTO 2010 Runtime components explained (Aeron Cathcart).

    As far as I know, Excel 2010 can load Excel 2007 no problem. I think if there is any issue going on here, it is likely to be related to the absense of the required VSTO components on the target machines. Perhaps some of the machines work because they have .NET 3.5??


    Norm Estabrook
    Thursday, May 5, 2011 7:57 PM
    Answerer
  • Norm,

    Thanks for your reply. The machines have all the required pre-requisites for VSTO. Actually excel 2007 opens fine with excel 2010. This error (shown above) shows up only when we add a new sheet to VSTO workbook, save it and open the it again.

    So now quite sure, if this is excel 2010 issue ?

     

    Thanks

    Vipin

     

    Tuesday, May 10, 2011 4:50 PM
  • Finally figured it out. In excel, they have this option to enable 'Trust access to the VBA project object model'. It was disabled in the excel 2010 on the machines where it was not working.

    Go to  File > Excel options (or Options) > Trust Center > Trust Center Settings > Macro Settings

    There you should see 'Trust access to the VBA project object model' check box under 'Developer Macro Settings'. Check it and press ok.

    Enabling this option got rid of the above error for us.

    • Marked as answer by V. K Thursday, May 19, 2011 1:21 PM
    Thursday, May 19, 2011 1:20 PM