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.
Related
i am trying to make a COM excel addin in VB from visual studio 2012, but keep getting the following error....
Error 1 The assembly 'Microsoft.Office.Tools.Common.v4.0.Utilities, Version=10.0.0.0,Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' is not registered for COM Interop. Please register it with regasm.exe /tlb. ExcelAddIn1
I have checked the "register for Com interop" check box in the properties.
I am using visual studio 2012 and excel 2010.
Any help would be appriciated.
Cheers,
Chris
Install the Office 2010 Primary Interop Redistributable (there is none for later than 2010) from https://www.microsoft.com/en-us/download/details.aspx?id=3508
Open an Administrative Command Prompt
Run:
CD "C:\Program Files\Reference Assemblies\Microsoft\VSTO40\v4.0.Framework"
and then
"\windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe" /tlb Microsoft.Office.Tools.Common.v4.0.Utilities.dll
Rebuild your VS project, it should work now.
Download and install the MS Office Office 2010 Primary Interop Assemblies.
http://www.microsoft.com/en-us/download/details.aspx?id=3508
Depending on your solution you may need this as well: http://www.microsoft.com/en-us/download/details.aspx?id=20479
Open Visual studio command Prompt and register your dll as mentioned in the below format
regasm.exe /tlb
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´ve created several VSTO add-ins for Outlook/Word/Excel/PowerPoint.
When i build them & then start the accociated program, the add-ins are installed and work wonderful.
When I try to install the DLL manually, in "Options > Add-Ins > COM-Add-Ins:Go to... > Add..." and then select the DLL, the program tells me, that it is not a valid Add-In.
What is the problem here? Visual Studio 2010 can install them automatically.
Can someone help me?
Thanks!
The simplest way to make an installer for your add-ins is to use the "Publish" functionality. Right click your Add-in project and select publish. This will show a wizard with basic options. This will generate an EXE file and a series of other files that are needed to install in other machines.
A .net VSTO addin DLL is not a normal COM dll (for instance, it doesn't self register, it has no TLB embedded within it) so Word can't deal with it through that addin's dialog as far as I know. VSTO addin's have to be installed via an installer.
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.
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.