I'm trying to create a custom Excel add-in.I currently have Visual Studio Ultimate 2013 and Microsoft Excel 2010.The problem that I currently have is that when I create a new Excel Add-in project and I try to build, it says that I haven't got a proper version of Office installed and it provides a link for reference. Whenever I visit the link it actually says that Excel 2010 is supported. Whenever I start excel it actually loads the add-in in the list of installed add-ins,but I cannot debug or run it in Visual Studio! Has anyone had any problems with this?
Related
I have used Shared Add In(C#) to develop an Excel Add-In. In the initialization, I had no problem with loading excel-dna file .xll on Office 2010. However, there is problem with running on either Office 2013 or 2016, showing that "function is Invalid".
AddIn udfAddIn = applicationObject.AddIns.Add(progID, true);//the exception is "AddIns is Invalid"
udfAddIn.Installed = load;
Please help me. I would like to know how it (.xll file) works on Office 2013 and 2016 by shared add in. Thanks!
You are mixing two different technologies when you make a Shared add-in (a COM add-in) with Excel-DNA. I'm surprised it worked with Excel 2010.
The best approach is to make a new Class Library project (targeting .Net Framework) and then install the ExcelDna.AddIn package from NuGet. Then follow the instructions in the readme file that pops up. You should have a starter add-in that works in both Excel versions.
The best place for Excel-DNA support is the Google group at https://groups.google.com/forum/m/#!forum/exceldna
I have an Excel Add in , which is built in Visual Studio using C#.
This add-in was designed for Microsoft Excel 2010, but I want to know if it is possible to run the same add-in in excel 2013.
I am getting the following error:
You cannot debug or run this project because the following version on microsoft office is not installed
Is there any way to run the same code for Excel 2013?
Yes it is, but it searches for Office 2010 by default. If you have Office 2013 installed, it can't find it.
You should provide the startup executable to Visual Studio. You have to set the Start external program in the project properties to the Excel executable. At my desktop it is C:\Program Files\Microsoft Office\Office15\EXCEL.EXE.
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'm getting the error 'You cannot debug or run this project, because the required version of Microsoft Office application is not installed'
The project was created as an Outlook 2007 add-in and Outlook 2007 is definitely installed. I can even manually deploy it by running the VSTO file after building the project, but still get that message when attempting to debug.
is there a value I have to change somewhere to make it work again?
Have you check the condition in your project build rules that triggered this error? (which line in .vcproj file?)
If it's not a new project, you could try to create a new one, check whether it works and compare your project with the new one for differences (.vcproj file)