2
votes

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.

3

3 Answers

3
votes

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.

1
votes

No you cant, because interop/vsto library you reference has to be different.

Excel 2003 works on VSTO 2005 SE whereas Excel 2010 needs VSTO 2010 library.

VSTO 2005 doesnt work with Excel 2010 and VSTO 2010 doesnot works Excel 2003.

1
votes

To expand on your findings, Rob, yes, that is correct (you can). I believe the other contributor has made a mistake.

For 32-bit versions of Office, it will work (and it does, so you have found), but it will not work for 64-bit editions of Office. Microsoft clearly states this compatibility restriction (well, as a footnote at least).

See the MSDN article Running Solutions in Different Versions of Microsoft Office. Under section "Running Office Solutions Created By Using Previous Versions of Visual Studio", you will see in the chart in the last row that using VSTO 2005 SE with a project template targeted for Office 2003 will run on Microsoft Office 2003, Microsoft Office 2007, and Microsoft Office 2010 (32-bit only).

It goes on further to say that you will be required to install the Visual Studio 2005 Tools for Office Second Edition runtime on the client's PC.

Your options that you described are correct. Those should be the only options that you have.