none
Excel 2003 Document Level Customization and Excel 2010 RRS feed

  • Question

  • Does anyone know if there is a way to make an Excel 2003 Document Level Customization work with Excel 2010? When I try to execute this document level customization built on Excel 2003 and VSTO 2005 SE, I get the following error.

    "The assembly * could not be found at or could not be loaded.

    You can still edit and save the document. Contact your administrator or the author of this document for further assistance."

    Any help would be appriciated.

    Note:  This Excel Document level customization works on Excel 2003 and 2007.  For some reason the document can't locate the code behind assembly when used with Excel 2010.
     
    Properties within the Excel Workbook.
     
    _AssemblyLocation: *
     
    _AssemblyName: <a guid value>

     

    A side thought, is there a config file that needs to be in place next to the Excel.exe executable to enable support of .Net runtimes below .Net 4.0?


    Rob
    • Edited by Rob K In Dev Wednesday, January 4, 2012 9:24 PM consolidation of messages
    Wednesday, January 4, 2012 9:17 PM

Answers

  • Hi Rob

    Office 2003 solutions created using VSTO 2005 SE cannot run under Office 2010 for 64-bit. See:
    http://msdn.microsoft.com/en-us/library/bb772080.aspx

    So I think you will need to upgrade the solution in order for it to work in this configuration.

    <<Regarding building these solutions with VSTO 4.0, is that i don't believe that the Excel 2003 solution would work on an Excel 2003 only desktop client machine.  I didn't think Excel 2003 would be compatible with .Net 4.0 libraries, which I thought, VSTO 4.0 was a .Net 4.0 library.>>

    I think you are correct. The .NET code itself would be version-independent (not rely on PIAs). But the VSTO run-time would be an issue.

    What could work across all three versions, from what I can see, would be to upgrade the customization in VSTO 2008 Professional (or higher), if you can obtain it. The runtime for .NET Framework 3.5 SP1 should be supported for all three versions of Office (2003, 2007, 2010, incl. 64-bit) if I'm interpreting the information in this deployment article correctly:
    http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/1666d2b0-a4d0-41e8-ad86-5eab3542de1e


    Cindy Meister, VSTO/Word MVP
    Saturday, January 7, 2012 7:41 AM
    Moderator

All replies

  • Just to share with people what I've learned thus far.

    Office 2010, specifically in this case Excel 2010, has 64bit compatibility issues with Document Level customizations and I think Add-Ins when executing solutions built on Excel 2003 files.  This appears to be an issue more specifically with Visual Studio Tools For Office SE (VSTO) where the OTKLoader.dll, being 32 bit, can't be loaded by Excel 2010 64bit version.

    Our specific test was to take an Excel 2003 Document Level customization built by Visual Studio 2008, and install it on a Windows 7 64 bit machine running Office 2010 64 bit.  The error received is the error as stated in my original question. 

    We then took a Windows 7 64 bit machine running Office 2010 32 bit and installed the Office Business Application.  The OBA, the documen level customization, executed without error.

    You'll probably want to reference the following article from Microsoft.

    "Compatibility Between the 32-bit and 64-bit Versions of Office 2010"
    http://msdn.microsoft.com/en-us/library/ee691831.aspx

    I personally haven't made it through the article completely, but there's enough descriptive text and some explict statements that lead me to believe that Office 2003 customizations, currently, are not compatible with Office 2010's 64 bit version.

    Hope that helps someone out there.  This was a real pain to sort out.

    Note the options we're presenting at this time are to:
    A:  Only allow 32 bit versions of Office 2010.
    B:  All Office / Excel 2003 Document Level Customizations must be upgraded, at a minimum, to Excel 2007 solutions.


    Rob
    Thursday, January 5, 2012 10:36 PM
  • Hi Rob,

     

    Thanks for posting in the MSDN Forum.

     

    I think I don’t understand the <<All Office/Excel 2003 Document Level Customizations must be upgraded. At minimum, to Excel 2007 solutions. >> would you please explain it?

     

    It’s based on my experience the 2003 document-level application need .NET Framework 2.0 Support. If you haven’t installed .NET Framework 2.0 on your computer your application will not work. And I don’t think your project need to migrate. If you can do that why not rebuild it as an Excel 2010 solution? As far as I know, that we can create xlt formatted template application under Visual Studio 2010, VSTO 4.0, Office 2010.

     

    Have a good day,

     

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    Friday, January 6, 2012 4:32 AM
    Moderator
  • strange, my last post seems to have vanished.

    Our issue is that it appears that the way a VSTO solution loads into Excel 2010, is that the 32bit VSTO 2005 SE libraries, being 32bit, are not compatible with the 64bit version of Excel 2010.  Which corrisponds to information provided in the msdn link I provided.

     

    Regarding .Net 2.0, we do have .net 2.0 installed.  It does not appear to be a .Net issue.

     

    Regarding building these solutions with VSTO 4.0, is that i don't believe that the Excel 2003 solution would work on an Excel 2003 only desktop client machine.  I didn't think Excel 2003 would be compatible with .Net 4.0 libraries, which I thought, VSTO 4.0 was a .Net 4.0 library.


    Rob
    Friday, January 6, 2012 11:35 PM
  • Hi Rob

    Office 2003 solutions created using VSTO 2005 SE cannot run under Office 2010 for 64-bit. See:
    http://msdn.microsoft.com/en-us/library/bb772080.aspx

    So I think you will need to upgrade the solution in order for it to work in this configuration.

    <<Regarding building these solutions with VSTO 4.0, is that i don't believe that the Excel 2003 solution would work on an Excel 2003 only desktop client machine.  I didn't think Excel 2003 would be compatible with .Net 4.0 libraries, which I thought, VSTO 4.0 was a .Net 4.0 library.>>

    I think you are correct. The .NET code itself would be version-independent (not rely on PIAs). But the VSTO run-time would be an issue.

    What could work across all three versions, from what I can see, would be to upgrade the customization in VSTO 2008 Professional (or higher), if you can obtain it. The runtime for .NET Framework 3.5 SP1 should be supported for all three versions of Office (2003, 2007, 2010, incl. 64-bit) if I'm interpreting the information in this deployment article correctly:
    http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/1666d2b0-a4d0-41e8-ad86-5eab3542de1e


    Cindy Meister, VSTO/Word MVP
    Saturday, January 7, 2012 7:41 AM
    Moderator
  • So only my Office Document Level Customization project would need to be at that version?  Do you know if there would be a problem if I had .Net 2.0 libraries being used as well?
    Rob
    Wednesday, January 18, 2012 5:23 PM
  • Hi Rob

    The Office applications can only load and work with one version of the .NET Framework at a time, so you couldn't for example, have components running in .NET 3.5 and 2.0.

    Whether this also extends to outside DLLs the solution calls I do not know. And if it does, I simply don't know enough about .NET to tell you whether there'd be a way for you to run these DLLs in an "outside" domain.


    Cindy Meister, VSTO/Word MVP
    Thursday, January 19, 2012 6:37 AM
    Moderator