Have Office 2010, need to compile VB.Net for 2007 - vb.net

Running VS 2010 under Win7 64-bit, and have Office 2010 installed. The application I'm working on opens and searches Excel spreadsheets and needs to run under Vista 32-bit with Office 2007.
I've tried the suggestion found here - drop Microsoft.Office.Interop.Excel v14 and add v12 - but running o2007pia.msi just tells me I have to install Office 2007. I don't have Office 2007 available to me, and I can't install anything on the machines running Office 2007.
Is there a way around this?

o2007pia.msi is not forward-compatible with Office 2010. Use the Office 2010 PIA, which should be backward-compatible with Office 2007, so long as you don't use any Office 2010 specific features.

Related

Outlook Addin is working fine in windows 2007 and office 2016, but plugin is not getting Loaded in windows 2010 and office 2016

I have created Outlook add-in in c# visual studio 2013 ,which is working fine in windows 2007 and office 2016, but plugin is not getting Loaded in windows 2010 and office 2016.
1.add-in is not available under disabled COM add-in list.
2.Its registry value of load behaviour is 3 i.e loaded.

Write outlook 2007 add-in with visual studio 2013

Is it posssible to write outlook 2007 add-in using visual studio 2013 in C#. Thanks for help.
According to Microsoft, the latest version of Visual Studio that can create an addin for Office 2007 is Visual Studio 2010.
If you want to develop an Office 2010 addin etc., you can use Visual Studio 2010 or Visual Studio 2012.
If you want to develop an Office 2013 addin etc., you can only use Visual Studio 2013.
Office Development and Visual Studio
This probably a bit late, but just for future reference: Running Solutions in Different Versions of Microsoft Office
There's no out of the box template for Office 2007 in Visual Studio 2013, but the addin will run fine in Office 2007.
Your project will have the Object Model for Office 2013 so while you can use it in previous versions of Office, you need to be careful not to call methods that aren't available in the earlier versions. For example in Outlook 2013 there is an inline reply so if you try to call that method in Outlook 2007 it will throw an exception.
If you're just looking to use the newer Visual Studio IDE for Office 2007 development then you can remove the 2013 Office references and add the 2007 references and you won't see any new methods as outlined above.
Edit: Not that you'd want to do this, but if you wanted to use the newer object model from 2007 without pulling in the interop library for 2013 you can actually call those newer methods dynamically and specify non existing delegate types by using Delegate.CreateDelegate, if anything it's pretty neat.

microsoft office document imaging on windows 2008 64 bit

I have done document imaging on windows 7 with MODI in office 2007 and it is successful. But when I install the same office 2007 with MODI onto windows server 2008, it does not work with my program anymore. it is throwing a comexception of "(0xc6c80001): Object hasn't been initialized and can't be used yet at MODI.IDocument.OCR". I did not change anything for the codes at all. Anyone has any idea?

Excel 2003 Document Level Customization and Excel 2010 Compatibility

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.
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.
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.
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.

Visual Studio 2010, Office 2007 & 2010 Interopability

On my development PC, I uninstalled Office 2007 and installed Office 2010.
I have a VS 2010 Solution that has several Excel 2007 templates (projects).
When I open the Solution, VS wants to "upgrade" the project (to Office 2010). I cancelled out of that and in the VS options, I turned off "Upgrade to latest version of Office".
Now, the solution opens fine, but the Excel 2007 template projects will not load or open. All the clients that run this appication have Office 2007 intalled, so I need to be able to continue to develop this application and target Office 2007.
Can anyone tell me how to do that? (I downloaded and installed the Office 2007 PIA...)
Thanks!
As a rule I always suggest running the version of office on your development machine that you are targeting, otherwise you loose F5 support and things often don't work as they should.
Another point is that if you do upgrade to Office 2010, the add-in will still work on 2007, as long as you do not access any of the 2010 API's. So technically if you upgrade the project to 2010, then remove the reference to Microsoft.Office.Interop.Excel v14 and add v12, that will restrict you to office 2007 API's, and you shouldn't have a problem.
Just give it a go, upgrade the project, then try install it into Office 2007, it should work fine. If not, just undo/revert your local changes.
I think your problem is VSTO, VSTO 3.5 was office 2007, vsto 4 comes with VS2010 and is Office 2010.
You might check on what versions of VSTO are currently installed and make sure you've got the right ones.