locked
Creating Outlook 2010 plug-in without VSTO or PIA RRS feed

  • Question

  • Hi,

    We have been using VSTO based solutions for a long time now in developing add-in functionality for office 2007 and 2010. One of our potential Office 2010 cutomers however has problems installing VSTOR4 (and therefor all PIAs as it's the same package nowadays) on their system. Turns out they are using Vista with no more updates than SP1, on which installing VSTOR4 is simply not possible. For undisclosed reasons, they cannot update their Vista systems to SP2, but they want the functionality anyway.

    Specifically for this customer, we are looking for a creative way to create a simple Outlook Add-In that does not make use of VSTO, nor of the Office 2010 PIAs that are shipped together with the VSTOR. The add-in need not do more than add a few buttons and a text box somewhere, and call another COM object immediately.

    I have been stuck looking at all sorts of documentation for a day now, and was wondering, does anyone have an idea if creating an outlook 2010 addin is possible at all without using the VSTO/PIAs, and if so, how?

    Thanks.

    • Moved by Cindy Meister MVP Tuesday, June 15, 2010 2:30 PM non-VSTO solution required (From:Visual Studio Tools for Office)
    Tuesday, June 15, 2010 2:21 PM

Answers

  • Hi Pieter-Bas

    I'm going to move your message to the Outlook Developer forum, as that should be a better venue for a "do it without VSTO" discussion.

    However, the only way, really, to interact with an Office application without going thorugh its Type Library (=PIA or IA) is to use late-binding. If you're a VB.NET developer, or can at least do that in your solution with Option Strict Off, it's simple. Declare everything in the Outlook or Office object model as data type Object and delete all references to the PIAs.

    If you need to be doing this in C# and you can use .NET 4, it should be just as simple. If you can't use .NET 4, then you have to go over GetType().InvokeMember.

    Hope that gets you started, and off you go to the Outlook Developer forum... :-)


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by Tim Li Thursday, June 17, 2010 11:06 AM
    Tuesday, June 15, 2010 2:29 PM
  • To add to what Cindy said, you can use a shared addin that handles the Extensibility interface events to get connected to Outlook, and instead of a PIA you can use reflection for accessing methods and properties of the Outlook object model. You will have to be careful to check the runtime version of Outlook if you are using properties or methods that may not be available to you.
     
    If you download the sample addins for Outlook 2007 from MS on the Office Developer Web site you will see an example there of using late binding (reflection) to access various Outlook properties and methods on Objects that you can use as a model.

    --
    Ken Slovak
    [MVP - Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007.
    Reminder Manager, Extended Reminders, Attachment Options.
    http://www.slovaktech.com/products.htm
     
     
    "Cindy Meister" <=?utf-8?B?Q2luZHkgTWVpc3Rlcg==?=> wrote in message news:9cb7abb2-7cee-4e93-8234-efad3f42a3ae...

    Hi Pieter-Bas

    I'm going to move your message to the Outlook Developer forum, as that should be a better venue for a "do it without VSTO" discussion.

    However, the only way, really, to interact with an Office application without going thorugh its Type Library (=PIA or IA) is to use late-binding. If you're a VB.NET developer, or can at least do that in your solution with Option Strict Off, it's simple. Declare everything in the Outlook or Office object model as data type Object and delete all references to the PIAs.

    If you need to be doing this in C# and you can use .NET 4, it should be just as simple. If you can't use .NET 4, then you have to go over GetType().InvokeMember.

    Hope that gets you started, and off you go to the Outlook Developer forum... :-)


    Cindy Meister, VSTO/Word MVP

    Ken Slovak MVP - Outlook
    • Marked as answer by Tim Li Thursday, June 17, 2010 11:06 AM
    Tuesday, June 15, 2010 5:04 PM

All replies

  • Hi Pieter-Bas

    I'm going to move your message to the Outlook Developer forum, as that should be a better venue for a "do it without VSTO" discussion.

    However, the only way, really, to interact with an Office application without going thorugh its Type Library (=PIA or IA) is to use late-binding. If you're a VB.NET developer, or can at least do that in your solution with Option Strict Off, it's simple. Declare everything in the Outlook or Office object model as data type Object and delete all references to the PIAs.

    If you need to be doing this in C# and you can use .NET 4, it should be just as simple. If you can't use .NET 4, then you have to go over GetType().InvokeMember.

    Hope that gets you started, and off you go to the Outlook Developer forum... :-)


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by Tim Li Thursday, June 17, 2010 11:06 AM
    Tuesday, June 15, 2010 2:29 PM
  • To add to what Cindy said, you can use a shared addin that handles the Extensibility interface events to get connected to Outlook, and instead of a PIA you can use reflection for accessing methods and properties of the Outlook object model. You will have to be careful to check the runtime version of Outlook if you are using properties or methods that may not be available to you.
     
    If you download the sample addins for Outlook 2007 from MS on the Office Developer Web site you will see an example there of using late binding (reflection) to access various Outlook properties and methods on Objects that you can use as a model.

    --
    Ken Slovak
    [MVP - Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007.
    Reminder Manager, Extended Reminders, Attachment Options.
    http://www.slovaktech.com/products.htm
     
     
    "Cindy Meister" <=?utf-8?B?Q2luZHkgTWVpc3Rlcg==?=> wrote in message news:9cb7abb2-7cee-4e93-8234-efad3f42a3ae...

    Hi Pieter-Bas

    I'm going to move your message to the Outlook Developer forum, as that should be a better venue for a "do it without VSTO" discussion.

    However, the only way, really, to interact with an Office application without going thorugh its Type Library (=PIA or IA) is to use late-binding. If you're a VB.NET developer, or can at least do that in your solution with Option Strict Off, it's simple. Declare everything in the Outlook or Office object model as data type Object and delete all references to the PIAs.

    If you need to be doing this in C# and you can use .NET 4, it should be just as simple. If you can't use .NET 4, then you have to go over GetType().InvokeMember.

    Hope that gets you started, and off you go to the Outlook Developer forum... :-)


    Cindy Meister, VSTO/Word MVP

    Ken Slovak MVP - Outlook
    • Marked as answer by Tim Li Thursday, June 17, 2010 11:06 AM
    Tuesday, June 15, 2010 5:04 PM