Making vsto add-in installable - vsto

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.

Related

how use Excel COM add-in a VSTO add-in without installing visual studio

how do I get my vsto to work on Excel without the settings of Visual Studio? im trying to add not valid. can you help me a solution for that
the file that I have
If you are trying to distribute a VSTO add-in, the target machines will need the VSTO runtime.
https://www.microsoft.com/en-us/download/details.aspx?id=48217

Installer not installing Outlook Add-in

Whenever I build the Add-in from Visual studio(2017 Community version),the add-in gets loaded in Outlook(2016) and functions as expected.But when I remove the add-in from Outlook and then try to install it using the .msi installer file the add-in doesn't gets loaded in the Outlook.
Anyone having any idea about this?

PowerPoint 2003 COM Add-In

I have a PowerPoint Add-in. I created a setup for it and installed it. It works fine on my machine but the problem is when I install it on a fresh machine with a fresh copy of PowerPoint 2003, the add-in installs successfully but there is no COM Add-in option (menu) in PowerPoint in Tools -> COM Add-in and my add-in is not loaded.
I don't know why I have COM Add-in option in my development machine but not on the fresh machine. There must be some sort of setting or some other thing required before it can work.
So the question is there any other thing needed to download or install to be able to install COM Add-ins?
I developed the add-in in .NET 3.5 using C#, if that helps. Also I'm using Windows XP SP2.
Thanks.
I don't recall ever having seen a COM add-in option on the PPT 2003 tools menu, but I don't use .NET. Perhaps it's something that Visual Studio adds.
Or another possibility ... perhaps the menu item only appears when there are user-uninstallable COM add-ins installed.
With PPA add-ins, you can install them via registry entry in either HKCU or HKLM. If HKCU, then appear on the Tools | Add-ins dialog and the user can unload or remove them. If HKLM, they're hidden from the user.
I know there's one COM add-in installed to my copy of PowerPoint; just checked and it's registered in HKLM. Perhaps that's why there's no COM addins option on the Tools menu.
You can verify whether the COM add-in is loaded (even if from HKLM) with a bit of VBA run from within PPT:
Dim oCOMAddin as Object
For Each oCOMAddin In Application.COMAddIns
Debug.Print oCOMAddin.ProgID & vbTab _
& oCOMAddin.Description
Next oCOMAddin
That should at least tell you whether your add-in is properly loading or not.

How to deploy an Outlook macro?

I made an Outlook macro. How can I deploy it to use it on some other machine?
Do I follow the same steps I followed on my machine Tools-> Macros-> create new or is there another way to deploy as we do with the vb or C# projects?
No, you don't need to follow the same steps and re-record the entire macro from scratch. You can save the module containing the macro and import it in Outlook on the other machine.
In Outlook's VBA editor, right-click your module > Export File...
Then on the other machine, in Outlook's VBA editor, right-click your project > Import File...
EDIT You say that your Outlook doesn't have VB Editor. Quoting from Outlook help:
you may be running a Microsoft Office
program with the Visual Basic for
Applications (VBA) shared feature disabled.
I don't know what version of Outlook you have, but for 2003:
To re-enable VBA, follow these steps:
1.Run the Office Setup program again. How? Quit all programs.Double-click
the Add/Remove Programs icon in the
Microsoft Windows Control Panel.Do one
of the following: If you installed
your Office program as part of
Microsoft Office, click Microsoft
Office in the Currently installed
programs box, and then click the
Change button.If you installed your
Office program individually, click the
name of your program in the Currently
installed programs box, and then click
the Change button.
2.On the Features to install screen in the Setup program, click the plus sign
(+) next to Office Shared Features.
3.Select Visual Basic for Applications, click the arrow next to
your selection, and then click Run
from My Computer.
Usually outlook macros are only made for personnal use. Distributing them can be hard as it needs too much actions made by the user (add "devoloper" in ribbon, open visual basic editor, import files, enable references, enable security...).
Microsoft wrote:
If you are developing a solution that you intend to distribute to more than a few people, you should convert your VBA code into an Outlook COM or VSTO add-in or an Office add-in for Outlook.
(source: https://support.microsoft.com/en-us/help/290779/managing-and-distributing-outlook-visual-basic-for-vba).
Knowing that, i recommend you to write a VSTO add-in and deploy it using ClickOnce.
You can start by these links:
VSTO
https://learn.microsoft.com/en-us/visualstudio/vsto/getting-started-programming-vsto-add-ins?view=vs-2019
ClickOnce deployment
https://learn.microsoft.com/en-us/visualstudio/vsto/deploying-an-office-solution-by-using-clickonce?view=vs-2019

Deploy VSTO application in visual studio windows application

I have created a VSTO application using office 2005 & visual studio 2005 professional.I found there a setup folder.While i am running the *.exe file in client machine,it giving me error."An add-in could not be found or could not be loaded."
What is the architecture of the client machine?
If Vista: do you have the UAC (Security Dialog) disabled?
Also check in the Registry if the Path to the Manifest File is correct.
Is it loading the right Framework Version?
Are you using the Publish feature, or are you trying to create your own MSI?
You need to do some debugging on your side to have this sorted maybe:
Try to uninstall VSTO SE completely and install it again.
Create a new VSTO add-in without any additional code and run it.
Evaluate what happens and perform actions accordingly