Please explain what an outlook add-in is - visual-studio

Can someone give me a quick explanation of when I would use Visual Studio 2008 Outlook 2007 Ad-In project type? and how would that compare to developing a bunch of outlook macros directly in outlook?
Basically, I want to have some sort of application read email (with attachments) from a pop3 email box, do some filtering/editing/validation of the subject/sender/content and then if certain conditions are met, save the attachments to a local file, and then add an entry into an SQL server database table (i.e. date/sender/subject/message).
Seems there are at least 10 different ways to do this....so between an outlook macro and a VS Office Project, how do I pick?
I am not clear, if I create this solution as a Visual Studio outlook add-in, where does it run? Is it loaded into outlook, does it run as a separate process and communicates back and forth with outlook? if outlook is not running, does it start it?

An Outlook Add-on is a compiled component that uses the Outlook API to perform the tasks you need. A macro/VB script is an interpreted script that actually uses the same API. The add-on approach is better if you want to deploy your functionality.
When you work on an Outlook add-on in Visual Studio, you'll be creating a .NET component, which integrates into the Outlook application, which is written in C++ so uses COM. You'll have to be careful about managed/unmanaged types and releasing objects you retrieve from Outlook.
I have recently completed just such a tool, but I chose to use Add-in Express (http://www.add-in-express.com/). These guys provide a layer of abstraction over the [challenging] Outlook API and also provide some excellent support if you're stuck.
In my case, with Add-in Express, I "run" by setting Outlook as the application command to run, in the Project properties. Add-in Express sorts out the installation of the add-on within Outlook. So when I press "Run", Outlook starts and my add-in is displayed, which may be debugged in the normal fashion. I'm not sure how VSTO (Visual Studio Tools for Office) works in this respect - or at least, I can't remember.

This is an example of an outlook add-in..
Personally, I don't see macros distributable.

Related

Outlook Addin Office Intitalize function in visual Studio 2017

I am developing an outlook addin using visual studio 2017 outlook web addin template.
I want to handle the event when the addin was first installed.
How can I get the installation event.I refered this link but its not giving me any event information for addin.
Office.initialize is used for determining when an add-in is launched and the runtime is ready. When the event is invoked, it means that all Office.js APIs are ready to use. There is no event for when add-ins are installed. If you are looking to create a "First-Run" Experience, you may use the RoamingSettings object to set some kind of mark if user went through your guide and doesn't want to see it any longer. This object will be available right after Office.initialize, so you can try to get this mark (key) and redirect to your app page(s) or your guide page(s) according.

Add-in for desktop and web Outlook

I am new in Office add-in development and little bit confused about creation JS plug-ins for Outlook. Actually we can create one add-in which will be available on all platforms: Outlook on Mac/PC, Outlook.com and Outlook 365.
But what about tools for it? According Outlook development documentation, we can use Yeoman generator for creating Office add-ins. However in my VisualStudio Community 2015 is type of project like "Web add-in", where I can chose Outlook add-in. So is there some difference between Yeoman generator and VisualStudio Web add-in projects?
Visual Studio is the main tool for creating Outlook plugins. You can also use Visual Studio Code for developing web-based solutions.
Office add-in is nothing else as "manifest.xml" file + your web application (HTML + JS). Web application is what your VS Code is help you to create. The manifest part is something which you able to write yourself, coy it from an example or use YO Generator to produce it for you. More on how to build office add-ins: Office Add-ins with VS Code and how to use generator: Yo Code - Extension Generator
To answer your question "is there some difference between Yeoman generator and VisualStudio Web add-in projects?": There is no fundamental difference. First choose whether to develop your Outlook Web Add-in with VS or with some non-VS tool. If you use VS, then use the project templates in VS. If you use any other development tool, use the yeoman-generated templates.
Occasionally, templates can get out-of-date. For example, recommended practices may change, or the manifest XML schema may be expanded. As a general rule, the yeoman-generated templates are updated more frequently than the ones generated in VS. For this reason, there may be small differences in the templates (besides the differences that are inherent to the differences in the tools).

Create MSI file from c# outlook addin in VS 2013

I have c# outlook addin created in visual studio 2013.
It has windows forms also.
I am getting mad on generating msi file, any easier solution/steps for me, please ?
Mainly tell me, after completing the process, where do I find the final MSI file (like bin/release folder) ?
I installed this - https://visualstudiogallery.msdn.microsoft.com/9abe329c-9bba-44a1-be59-0fbf6151054d
as well as installshield limited edition installer.
I was able to build it and ran the installation file(.exe) from disks folder and it is installing but not showing anything in the outlook.
Take a look at the Deploying an Office Solution section in MSDN. It describes two possible options for deploying your Office solution in depth:
Deploying an Office Solution by Using Windows Installer
Deploying an Office Solution by Using ClickOnce
It is up to you which way is to choose.
I was able to build it and ran the installation file(.exe) from disks folder and it is installing but not showing anything in the outlook.
There are multiple reasons why you don't see your add-in in Office applications.
First of all, make sure that you did all the steps described in the previously mentioned articles. Then I'd suggest checking the required windows registry keys for COM add-ins, see Registry Entries for Application-Level Add-Ins for more information.
Microsoft Office applications can disable add-ins that behave unexpectedly. If an application does not load your add-in, the application might have hard disabled or soft disabled your add-in.
Hard disabling can occur when an add-in causes the application to close unexpectedly. It might also occur on your development computer if you stop the debugger while the Startup event handler in your add-in is executing.
Soft disabling can occur when an add-in produces an error that does not cause the application to unexpectedly close. For example, an application might soft disable an add-in if it throws an unhandled exception while the Startup event handler is executing.
You can read more about that in the How to: Re-enable an Add-in That Has Been Disabled article in MSDN.
Finally, you may also check out the Trust Center settings in Outlook. The Macro Security settings can be applied to add-ins as well. May be it is required to sign the add-in with a digial signature and etc.

Outlook scripting in C#?

I'm using Outlook 2010. Via the Developer ribbon, I see that I'm able to script Outlook using VBA. I'm also aware that you can create Outlook addins through COM that can pretty much have anything as their source language (C# / .NET included).
However, is there any way to actually code extensions to Outlook using built-in Outlook functionality using C#, rather than VBA? If not, are there any plans for Microsoft to allow this in future versions of Outlook?
I'm not sure what you mean by "built in" functionality. Addin can access anything VBA can access AFAIK.
Are you talking about converting the VBA editor to c sharp?

Outlook 2003 Addons

I want to create a custom Addon/plugin for Outlook 2003, to support integrated functionality with a task management system.
I am unable to find many good development resources for the same.
Can someone please explain Outlook 2003 architecure and development of a plugin.
Good links/resources are also welcome.
Here is a tutorial on outlook architecture getting started building Outlook 2003 plugins from MSDN:
http://msdn.microsoft.com/en-us/library/aa289167.aspx
There is also a huge list of resources here: http://www.microeye.com/resources/res_tech_vsnet.htm
Good luck!
What you want can be done.
The bottom line is that you need to use Visual Studio 2005 or Visual Studio 2008 plus Visual Studio Tools for Office (VSTO) plus Outlook 2003 (of course) to build an "Adddin" for Outlook.
Addins are quite complicated to write mostly because Outlook has eccentricities that are not well documented. For example, a method Outlook.MailItem.GetHashCode() is not always the same even for the same object despite what you might expect from something as seemingly absolute as a 'HashCode' for an object. Knowing that and many other quirks of the VSTO+Outlook API are for what the professionals get paid. There are MANY quirks. If you are learning then you will need to start with the resources Gdeglin has provided.
Also look at the MSDN VSTO forum:
http://social.msdn.microsoft.com/Forums/en-US/vsto/threads <- very active!
And Outlook code: http://www.outlookcode.com/
Also here is a Google search on MSDN for various VSTO 'tips'.

Resources