I have a vsto add-in for outlook developed in Visual Studio 2010 (.NET 4.0), but now when I tried to add this add-in for Outlook 2016 it is showing invalid vsto add-in. My question is:
Can the VSTO solution developed in Visual Studio 2010/12 support in Outlook 2016?
If not then what's the alternate or if yes then what I am doing wrong here?
A VSTO add-in should be installed on the machine. At least you need to add the required windows registry entries to load the add-in, you can't just add it. See Registry Entries for Application-Level Add-Ins and Registry Entries for VSTO Add-ins for more information.
My question is 'Can the vsto solution developed in Visual Studio 2010/12 support in Outlook 2016?'
Yes, it can. See Running Solutions in Different Versions of Microsoft Office. It states the following:
Microsoft Office applications can also run solutions created by using previous versions of Visual Studio. In some cases, these solutions require different versions of the Visual Studio Tools for Office runtime. Different versions of the Visual Studio Tools for Office runtime can be installed side-by-side on the same computer.
I'd suggest creating an installer which can check for preprequsites if any, add the required windows registry keys and install the plug-in on the system.
You may find the following articles helpful:
Deploying an Office Solution by Using Windows Installer
Deploying an Office Solution by Using ClickOnce
Related
I am developing my first Outlook Add-In in C#. In Visual Studio I have the options to develop an "Outlook 2010 Add-in" or "Outlook 2013 Add-in" or probably an "Outlook 2016 Add-in".
This Add-In should work on one PC which runs currently Outlook 2010 but which I could upgrade to a newer version.
If I start to develop an "Outlook 2010 Add-in" will this also work in Outlook 2013 and 2016? Do I have to do something to make it work with different versions of Outlook?
My Add-In will check some details of the mails and depending on the details it will sort these mails. I guess that should work in all versions.
Is there a clear advantage of an 2013 or 2016 Add-In compared to 2010?
As mentioned in comments by #penleychan, targeting the latest version is a good thought. I did the same when I develop my VSTO addin. Most of the time I have used the common features of the Outlook and developed the addin with template version similar to the installed office (on my machine). Its easy to debug.
If the addin is going use specific feature(s) of a version of Office, then we should use that version template.
You may like to refer this link.
You can run your Office 2010 based solution in later Office versions. You just need to choose the right target .net version. Read more about that in the Running Solutions in Different Versions of Microsoft Office article.
Is there a clear advantage of an 2013 or 2016 Add-In compared to 2010?
The only benefit you get in that case - the PIAs version corresponding to the target Office version. That means you will get access to objects, methods, properties and events available in later Office versions. Anyway, at runtime you still can use the late-binding technology which allows accessing missed members at design-time. See Type.InvokeMember for more information.
I have create a c# application with a windows service and 2 vsto projects. Once the MSI has been created/installed i can see the one add-in was installed and the service is deployed as well. My problem comes in where only one of the vsto projects is installed. The one that is giving me nightmares is a Outlook visual designer ribbon. The other vsto project is a non visual add-in, and that one installs just fine. For the life of me i can't figure out why the visual designer is not installing, it is not in outlook options and not in control panel/add remove either. Compiling it from Visual studio everything works fine and runs as it should. Does anyone maybe have an idea of what could be wrong? Thanks in advance.
If you don't see your add-in listed on the COM add-ins dialog the required windows registry keys were not added properly. See Registry Entries for Application-Level Add-Ins for more information.
Make sure that you did all the necessary steps described in the Deploying an Office Solution by Using Windows Installer article.
Is there any way to create add-in for Outlook 2007/2003 in Visual Studio 2012 (C#)?
So far I found that it should be possible and I just need to remove references from build-in 2010 add-in. Also tried to download some packages for older VS without success. After many attempts, during adding .dll file to Outlook 2007, I am still receiving error, that it is not add-in for Outlook 2007.
After all, I doubt a lot that I can do some add-in for old Outlook 2003 if I am not able to do it for 2007. It would enough for this time to force 2007 add some add-in with only MessageBox on startup.
You can try to use this library NetOffice. I'm using it and is very good.
Even if it does not fits your needs you can dig a little in the code and try to understand how they do it. They have nice examples.
BTW, If you are using VS express edition you cannot develop Office add-ins without a library like NetOffice.
I am currently working on an Excel 2010 add-in which formerly was an Excel 2007 add-in.
Somewhere in the process of switching computers, the add-in was converted i think.
Some of my customers stated that the add-in wasn't working on Excel 2007 anymore so I tried to debug it in a VirtualBox with Excel 2007 and Visual Studio 2010 installed.
Now I get the Error Message:
You cannot debug or run this project, because the required version of the Microsft Office application is not installed.
I started a new Excel 2007 add-in project and tried to find what the differences are and came up with the idea that it somewhat has to do with the dll's so I changed my 2010 addin until it looked like an 2007 addin.
I still get the error message stating that my project can't be debugged.
Is there anything I could've forgotten to change.
Writing a completely new addin is unfortunately not an option.
These questions haven't helped me so far:
Excel Addin that works on Excel 2007 and 2010
Deploying Office 2010 addin
To get VS 2010 working with Office 2007 modify the project file (.csproj) so that it will open in Office 2007 and not look for Office 2010 when run (hence the error message above).
Here is the project settings change (Excel example):
Source XPath:
//Project/ProjectExtensions/VisualStudio/FlavorProperties/ProjectProperties/#DebugInfoExeName
Old Value (Office 2010):
DebugInfoExeName="#Software\Microsoft\Office\14.0\Excel\InstallRoot\Path#excel.exe"
New Value (Office 2007):
DebugInfoExeName="#Software\Microsoft\Office\12.0\Excel\InstallRoot
\Path#excel.exe"
After changing this project setting, when you fire up the debugger (F5) it will load the Excel 2007 application instead of looking for Excel 2010.
Typically, when I am developing against multiple versions of Office with VSTO Add-ins, I have a project for each version of Office I am targeting. I put all common code between the projects into a single project (typically the oldest project) and use linked files, I add the common files to the newer projects. This allows me to write one set of common core code, abstracted from the requirements of each version of Office. This means I am no longer fighting the different ways VSTO is compiled for each version of Office. This can be made easier with shared folders and virtual machines, so I can develop and test without multiple computers. It is by no means graceful, but it works well for me. This should allow you to develop your VSTO Add-in against both Office 2007 and Office 2010 without much issue.
I am using Visual Studio 2010 to create a new add-in for Excel. Ideally I would like it to work with Excel 2011 (Mac), 2010, and 2007.
There are three template options to choose from when I start a new C# project.
(Office) Excel 2010 Add-in
(Extensibility) Visual Studio Add-in
(Extensibility) Shared Add-in
What are the differences between these template choices?
Thanks in advance.
From MS. As the name implies, you probably want to use shared add-in.
Office Excel 2010 Add-in
Creates an application-level add-in for Excel 2007 or Excel 2010. For more information, see Getting Started Programming Application-Level Add-Ins and Excel Solutions.
(Extensibility) Visual Studio Add-in
Visual Studio Add-ins add functionality to the Visual Studio and Visual Studio Macros environments. For more information, see How to: Create an Add-In.
(Extensibility) Shared Add-in
Shared Add-ins can add functionality to one or more Microsoft Office applications, as well as to Visual Studio. For more information, see How to: Create an Add-In.
Reference: http://msdn.microsoft.com/en-us/library/0fyc0azh.aspx
#1 and #3 will work for Windows machines, but straight from Geoff Darst of Microsoft's VSTO team, "the .Net Development Platform and Visual Studio Tools For Office are Windows only." You'll have to code in VBA to get functionality across all three versions.
If you want to target just the Windows environment, make sure you target the 2007 version of Excel, as I don't believe solutions developed for Excel 2010 are backward compatible with Excel 2007.