Do I need to develop multiple versions of my MS Outlook VSTO add-in? - vsto

I am about to develop my first ever MS Outlook add-in (following this MS guide).
As I create my new project, I see this ...
Was there really such a change between these versions of Outlook? Does this mean that I will have two develop two copies of my add-in? Is there no forward/backward comparability?
Am I even following the correct guide? Should I be developing a VSTO? This question has an answer by Outlook Add-ins Team - MSFT (although their profile does not actually any actual MS affiliation), which starts
We recommend using the web add-in framework, instead of COM, for
writing an Outlook add-in. The web add-in framework enables developers
to:
Write once and have their add-in run across supported Outlook clients
enabling the add-in to reach millions of Outlook Desktop, Outlook for
Web, Outlook for Mac, and Outlook Mobile users.

The short answer is no, a 2013-2016 VSTO Addin will work with 2010. If you need it to work with Office 2007 you'll have to add the assembly Outlook 2007 Primary Interop Assembly (PIA).

Related

Is there a Presentation.IsFullyDownloaded property for a vsto addin in C#?

As per the documentation by Microsoft, there is a property to check whether the presentation is completely downloaded or not in office VBA Reference.
Presentation.IsFullyDownloadedhttps://learn.microsoft.com/en-us/office/vba/api/powerpoint.presentation.isfullydownloaded
Is there any way to do this in a C# VSTO addin?
The 'Presentation' class in vsto solutionhas all the other properties as in the vba presentation class but not "IsFullyDownloaded".
If you can use it in VBA for your PowerPoint installation (that means it is implemented by the host application) you can call it using the late-binding technology available in .Net via Type.InvokeMember from any applications including VSTO add-ins.

Interacting with other addins

I am using word 2007 Version and came across one problem and looking for a solution to it.
I am using Grammarly Add-in for word and I am looking for a way to accept all the suggestions that Grammarly add-ins provide. I try to record a macro so that I can have some insight into the possible solution. But the macro recorder does not record anything while working within that add in.
The best what you could do is to contact Grammarly add-in developers to provide any public interface implemented in the COM add-in and which can be consumed by third-parties. The following walkthrough demonstrates how to expose an object in a VSTO Add-in to other Microsoft Office solutions, including Visual Basic for Applications (VBA) and COM VSTO Add-ins - Walkthrough: Call code in a VSTO Add-in from VBA.

vba or vsto or .. outlook development

Background:
I have come up with an idea that will make things easier for the company I work for. They even seem excited about the idea. The idea is to make an addin for Outlook to help with a task. So after doing a bit of research (obviously, not enough). I downloaded a trial copy of VS2010 pro and created a VSTO addin.
After creating the addin, it was time to package it for a small test deployment. That's when I found out that this is a much more difficult thing to do. It seems MS does not ship Office 2010 with the runtime needed to run VSTO, so i'd have to package that as well. In a company environment, this is not something simple to do.
So, I might have to go back to the drawing board.
Meat of the question:
I've never created an addin for office before, I really want more of a "drop in" solution. I'm not sure if VBA is the right solution. It seems more of a "document" level application (or macro?). Does any one know what would be the best type of solution for this?
Outlook API is not native .NET framework. To interact it with, .NET relies on marshaling and interrop assembly thus making it much more prone to errors and unstable.
From what I've seen so far with my outlook API experience, I would stick with VBA and you should consider retrieving a third party library that exposes outlook extended MAPI if you run in to much of trouble.
NetOffice is pretty good - it is a set of managed .NET libraries that handles the COM API with Office and only needs XCopy installation.
The best part is it tracks all runtime callable wrappers ('RCWs') you create when accessing objects through COM and automatically releases them when you dispose the top-level object (the Application in most cases), so you won't get the issue of an orphaned COM 'handle' preventing you from closing Office.
Alternatively, the Office Primary Interop Assemblies should be on any computer that has the relevant version of Office installed (at least for >= Office 2007). But there are cases when it won't so you will have to cover that possibility. VSTO redistributable should already be installed on any computer with Office 2010 or 2013. For Office 2007 you will need to install it. But again, better safe than sorry so you should include it in your installer in both cases.
For details on deployment options look at http://msdn.microsoft.com/en-us/library/bb386179.aspx
As for VBA, I don't have experience for Outlook addins so I leave that to others to explain. Other VBA Office app addins (Excel/Word/Visio/PPT at least - not sure about the others as I haven't used them) can be installed either using registry keys or through XCopying the addin to a trusted location and then telling the user to open Options/Manage addins and tick the tick box.
I highly recommend Add-in Express. They have tools that go beyond what Microsoft provides via Visual Studio.
Their features for Outlook development greatly reduce the amount of effort required to build Outlook add-ins

Outlook 2007 Add-in in Outlook 2003

Just a quick questions..
I have made an outlook add-in for 2007 version and when I tested it with version 2003 it did not seem to work.
Is there any special procedure I need to follow to enable to add-in in Outlook 2003 or it won't work at all? I hope I don't have to create a new one for 2003.
Thanks,
SL
Assuming that you are referring to an add-in created using VSTO.
When you create an add-in for Office 2007 the referenced Interop Assemblies will be the ones associated with Office 2007 and this is the main reason for your add-in not to work on Office 2003.
One alternative will be to reuse the custom add-in code but build it against Office 2003 Interop assemblies. This will work if you're not using any functionality inherent to Office 2007.
IIRC, a VSTO add-in developed for Office 2003 will possibly work on Office 2007 without change, but never the other way around.

Building a Com addin for Office 2000 / Office 2007

I am struggling to find a straight forward guide to creating office addins using VSTO and VB.net.
Specifically I would like to know how to be able to create a addin/ dll which can either be referenced from VBA in the form:-
Addin.method(argument) or Addin.property = X
Or which would install its own custom toolbars/ ribbon interface to an aspect of office for example Word.
I've checked MSDN and in terms of legibility and usability of the explanations I have drawn a blank so far.
I currently have a requirement to create at least one addin for Office 2000 to run and manipluate SQL and then a suite of addins for a customized Office 2007 (Word) set-up.
Adding global named items to the script engine from VBA code requires the script engine expose itself via IActiveScript::AddNamedItem. I doin't think Microsoft would do it anytime soon as this could break existing VBA code.
Got this working :-)
Using a class libary project and ComInterface / ClassInterface.