none
VSTO 2008 with Excel 2007 no longer working after changes to my computer system RRS feed

  • Question

  • I have: Microsost Office Enterprise 2007 and Microsoft Visual Studio 2008 Professional

    Several months ago, I was able to create Excel 2007 Workbooks using Visual Studios 2008. Now, after a while, I need to modify some things for an existing workbook and discovered error messages when when I try to edit existing workbooks in designer mode: "Excel Designer cannot be activated."

    So I then try to check if I can create a new excel workbook, but get this message:
    "Visual Studio cannot find a required object for Microsoft Office 2007. Run Setup and repair Office 2007 to fix the problem. You can run Setup by selecting Office in Add or Remove Programs, clickig Change, and then selecting Reinstall or Repair."

    Repairing Office 2007 as suggested did not work. I even tried completely uninstalling then reinstalling Office 2007 and Visual Studios 2008 (making sure VSTO was selected), but I still get this message.

    I looked around and tried other suggestions to no avail:
    Re-Installing/Repairing the VSTO Runtime 3.0 and PIA 2007 did not work either.
    Trust settings in Excel was already enabled to allow VBA access/macros.

    The only thing I am able to do in Visual Studios to see the workbook is to Debug, then Excel workbook builds fine and the workbook is functional. I just can't create new workbooks or edit in designer mode.


    So there were some changes to my system since the last time I regularly used VSTO, but I do remember I checked if my Excel Workbooks were fine (probably didn't check if I could edit or create new workbooks though).

    Anyway, the changes were:
    * New 64 bit Windows 7 OS (previously had Windows XP)
    * Office 2010 was installed briefly. It was uninstalled right away after I discovered my old Excel 2007 workbooks were not opening in Visual Studios.

    Please advise.

    Thanks.




    • Edited by rphila Wednesday, October 26, 2011 7:08 PM
    Wednesday, October 26, 2011 7:04 PM

Answers

  • I deleted: [HKEY_CLASSES_ROOT\TypeLib\{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}\2.5

    as suggested in the linked thread, but still had the same problem.

    However, I DID find a solution!

    It got me thinking that there were probably some other Office 2010 registries I should delete somewhere. So I found this program (CCleanser): http://www.piriform.com/ccleaner

    It removes all Office 2010 registry  entries. When running it, go to the 'Applications' tab and check 'Office 2010'. Everything else can be unchecked. Then click 'Analyze' to show what would be removed, and click 'Run Cleaner' to actually remove the Office 2010 residuals.

    After repairing Office 2007 and Visual Studios again, it worked for me.

     

    And I'll just leave this link here for others who may need to remove the registry keys manually (step 5): http://support.microsoft.com/kb/928218/

    It's for removing Office 12(2007), but you can replace it with Office14(2010).  Fortunately, I didn't have to do any additional manual deletion of keys, as the CCleanser software was enough for me.

     


    • Edited by rphila Monday, October 31, 2011 8:28 PM
    • Marked as answer by rphila Monday, October 31, 2011 10:12 PM
    Monday, October 31, 2011 8:27 PM

All replies

  • I have Office 2007 and Visual Studios installed on my neighbor's Windows 7 machine, and everything worked fine. It must have something to do with the Office 2010 that was briefly installed then uninstalled on my machine.

    Any suggestions? This is really frustrating me and preventing me from getting any work done.

    Friday, October 28, 2011 1:23 AM
  • <<I have Office 2007 and Visual Studios installed on my neighbor's Windows 7 machine, and everything worked fine. It must have something to do with the Office 2010 that was briefly installed then uninstalled on my machine.>>

    Yes, the installation of Office 2010 is almost certainly what happened, here. That will put the Office 2010 PIAs in the GAC and probably updated the Registry entries VSTO looks at to point at those PIAs rather than the Office 2007 ones.

    See if the information in the message marked as "Answer" in this thread helps. Just extrapolate from 2007 for 2010:

    http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/d6cd4f99-ca5f-407c-8fc3-1d5197e3e47a/


    Cindy Meister, VSTO/Word MVP
    Friday, October 28, 2011 5:31 AM
    Moderator
  • I deleted: [HKEY_CLASSES_ROOT\TypeLib\{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}\2.5

    as suggested in the linked thread, but still had the same problem.

    However, I DID find a solution!

    It got me thinking that there were probably some other Office 2010 registries I should delete somewhere. So I found this program (CCleanser): http://www.piriform.com/ccleaner

    It removes all Office 2010 registry  entries. When running it, go to the 'Applications' tab and check 'Office 2010'. Everything else can be unchecked. Then click 'Analyze' to show what would be removed, and click 'Run Cleaner' to actually remove the Office 2010 residuals.

    After repairing Office 2007 and Visual Studios again, it worked for me.

     

    And I'll just leave this link here for others who may need to remove the registry keys manually (step 5): http://support.microsoft.com/kb/928218/

    It's for removing Office 12(2007), but you can replace it with Office14(2010).  Fortunately, I didn't have to do any additional manual deletion of keys, as the CCleanser software was enough for me.

     


    • Edited by rphila Monday, October 31, 2011 8:28 PM
    • Marked as answer by rphila Monday, October 31, 2011 10:12 PM
    Monday, October 31, 2011 8:27 PM
  • Glad you tracked it down. And thanks for taking the time to report what worked for you :-)
    Cindy Meister, VSTO/Word MVP
    Tuesday, November 1, 2011 7:42 AM
    Moderator