In Visual Studio, create a new Project > Other Project Types > Extensibility > Shared Add-in and select the application or applications you are writing the add-in for. In my case, the add in is written for Outlook, so I unchecked everything and selected Outlook only. Hit next, give it a name and description. Then next again and check both boxes. Then Finish.
Since I'm writing code for the Send event, I need to have a new method:
void OutlookApplication_ItemSend(object Item, ref bool Cancel)
{
MessageBox.Show("Item sent");
}
That's it, now you need to package it into an MSI to install it on another machine. If all goes well, it will work on the new machine and you will have no problems, however that is not the case on most machines as I will be discussing in my next article.
Off topic
When you see the properties of the Setup file, set the Manufacturer to the name of the folder where you want this installed by default and also set the InstallAllUsers to True. On installation, the user has the option of changing it anyway, but it's good to have these set as default.