I have created an Outlook addin using VS2010 and VSTO 4.0.
On Windows7+Outlook 2010, the installation and and application behaves as expected.
On Vista+Outlook 2007 (fresh installed virtual machine), the installer complains that it does not recognize the .vsto file format.
Has anyone experienced this? When I previously created VSTO3.0 addins and used them on Outlook 2007 I had no problems with installation.
You need to install the VSTO 4.0 runtime (which comes pre-installed with 2010, but not with 2007). You can download it from Microsoft right here.
If you deploy using ClickOnce this runtime gets added to the prerequisites automatically.
Related
I have Office 2010 installed (and Office 365 as it happens), and am trying to develop an Outlook 2010 Add-in using VS2013 and VB.
I create a new Outlook 2010 Add In. Compile and Run the default app ("ThisAddIn"). Outlook 2010 opens OK. So far so good. Exit Outlook 2010.
Save the OutlookAddIn project.
Close VS2013
Restart VS2013. Try to open the saved project/ .sln and then get a "One Way upgrade" splash screen. Why...????
Tried the "upgrade", and it fails. "One or more projects in the solution were not loaded correctly...etc etc"
Output windows shows: " The application for the project is not installed" (That seems to indicate the solution "thinks" it's looking for an Office version other than Office 2010, I believe)
Solution Explorer window shows "OutlookAddIn1(loading)...The project file will load in the background" and the "One-way upgrade" splash returns.
Cancel that.
Solution Explorer window now shows "OutlookAddIn1(needs migration)...The project file will load in the background".
I try "Reload Project" in solution explorer. It appears to do so.
I try to run the app again, I get a dialog saying " You cannot debug or run this project, because the required version of Microsoft Office application is not installed".
Check Project Properties and ALL references appear to have gone. (?????)
I've reinstalled VS2010 Tools. That didn't work either.
I have tried VS2015 and get exactly the same behavior.
So....... I uninstalled Office 365 completely. That didn't work either.
Any clues please?
I have solved the problem, but don't know for sure what caused it. I suspect there were some corrupted pointers in Windows that were "confusing" Outlook 2016 with Outlook 2010. The only clues I had to this were that in the Control Panel>Default Items>Set Your Default Programs, the default app for mail was shown as Outlook 2016, but its associated description was all about Outlook 2010.
So I did a complete uninstall of Office 365 (Office 2016) followed by a complete uninstall of Office 2010. I then cleaned out as many registry entries and folders associated with those as I could.
I then reinstalled Office 365, followed by Office 2010. Now I can develop an Outlook 2010 app in VS2013 or 2015 as normal. So the problem is apparently solved without knowing its cause.
I am trying to build a simple addin for Word 2007 using Visual Studio 2010 and .NET 4.0. It's a relatively simple addin, which brings up a save dialog and saves the document as a Word 2003 document.
The addin runs fine in Word under Debug mode, but does not run under Release or when I create a setup project for it. (It does create the registry keys under HKCU\Software\Microsoft\Office\Word\Addins and they look to be correct) I don't get any errors, and the addin isn't listed under the Disabled Addins either.
I tried adding the Addin manually but it says that it isn't a valid addin. The version of Office is 32-bit, running under Windows 7 64-bit.
Or are there even any alternatives to using VSTO (VBA?) that will let me add a tab to the Ribbon?
You can use IRibbonExtensibility interface (http://msdn.microsoft.com/en-us/library/microsoft.office.core.iribbonextensibility.aspx) to avoid using VSTO.
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.
I want to build an add-in for Office applications using VSTO. I want to know if the VSTO runtime is installed along with the installation of MS Office 2007 or not. If Office installation does not install VSTO runtime then I will have to make my setups do that.
No, VSTO is not installed by default. Add it as a pre-requisite to ClickOnce or your setup project.
Is there a way to create and install a Microsoft Office Add-in without packaging the referred dll files. Assuming Microsoft Office is installed in the target PC where the Add-in can be installed, how to refer the Office dlls using C# code in the Add-in.
Check MSDN.