Compartir a través de


About: VSTO for Outlook

API Type:   UI Customization
API Interface: .NET
Business Logic: Adds features to the Outlook UI and to Outlook processing.
Development Languages: .NET, OOM.
Property Access: Yes
Product Versions: Visual Studio 2005 and later, Office 2003 and later.

Summary:

Outlook VSTO add-in development allows you to write add-inapplications which will run in Outlook from Office.

Points of Interest:

  • You can use Visual Studio to generate a stub project.
  • Outlook VSTO add-ins run only in Outlook from Office.
  • The capabilities of this API for are overall greater than what is available with the Add-ins for Outlook API.
  • Outlook Object Model code is used for doing work.
  • Work with Outlook events.
  • EWS code can be used to provide more robust capabilities.  You can convert between the identifier used under VSTO and EWS using the EWS conversion API.
  • Don't use Outlook Object Model off the mail thread – it's not supported.
  • You need to understand the issues with bitness when building applications using Outlook Object Model (OOM).  If you do not, then you may likely run into issues during deployment.
  • Outlook PIA's (Primary Interop Assemblies) are overall forward compatible.  However, you may have issues if you build an application for one version of Outlook but use it with an older version.
  • If you use COM components in your add-in then you need to account for bitness issues in your builds and deployment.

More Information:

Office Solutions Development Overview (VSTO)
https://msdn.microsoft.com/en-us/library/hy7c6z9k.aspx

Create VSTO Add-ins for Office by using Visual Studio
https://msdn.microsoft.com/en-us/library/jj620922.aspx

Walkthrough: Creating Your First VSTO Add-In for Outlook
https://msdn.microsoft.com/en-us/library/cc668191.aspx

Simple Outlook Add-in with VSTO 3.0
https://blogs.msdn.microsoft.com/jannemattila/2008/04/06/simple-outlook-add-in-with-vsto-3-0/

Improving the Performance of a VSTO Add-in
https://msdn.microsoft.com/en-us/library/jj729784.aspx

Videos:

VSTO: The Basics
https://channel9.msdn.com/Blogs/jennmar/VSTO-The-Basics

Office Add-in (VSTO) Performance Tips & Tricks
https://channel9.msdn.com/Blogs/funkyonex/Office-Solutions-VSTO-Performance-Tips--Tricks

VSTO: How to Add a Button into the Office Ribbon
https://channel9.msdn.com/Blogs/jennmar/VSTO-How-to-Add-a-Button-into-the-Office-Ribbon

Outlook Context Menus and Creating a Meeting from an Email
https://channel9.msdn.com/Blogs/jwiese/Outlook-Context-Menus-and-Creating-a-Meeting-from-an-Email

Outlook Object Model Overview
https://msdn.microsoft.com/en-us/library/ms268893.aspx

Creating Outlook Form Regions
https://msdn.microsoft.com/en-us/library/bb386301.aspx

Ribbon Overview
https://msdn.microsoft.com/en-us/library/bb386097.aspx

Customizing a Ribbon for Outlook
https://msdn.microsoft.com/en-us/library/bb398246.aspx

Custom Task Panes
https://msdn.microsoft.com/en-us/library/aa942864.aspx

More Information:

Getting Started (Office Development in Visual Studio)
https://msdn.microsoft.com/en-us/library/23cw517s.aspx

Office Development Samples and Walkthroughs
https://msdn.microsoft.com/en-us/library/z63ctsh2.aspx

General Reference (Office Development in Visual Studio
https://msdn.microsoft.com/en-us/library/5s12ew2x.aspx

Managed Reference (Office Development in Visual Studio)
https://msdn.microsoft.com/en-us/library/bb771305.aspx

Office Development Samples and Walkthroughs
https://msdn.microsoft.com/en-us/library/z63ctsh2.aspx

Securing Office Solutions
https://msdn.microsoft.com/en-us/library/bb157863.aspx

Deploying an Office Solution
https://msdn.microsoft.com/en-us/library/bb386179.aspx

Unmanaged API Reference (Office Development in Visual Studio)
https://msdn.microsoft.com/en-us/library/aa942114.aspx

About: Outlook Object Model (OOM)
https://blogs.msdn.microsoft.com/webdav_101/2015/05/18/about-outlook-object-model-oom

About: Mailbox Accessing APIs https://blogs.msdn.com/b/webdav_101/archive/2015/05/28/about-mailbox-accessing-apis.aspx

Samples:

VSTO - How to Customize Outlook's User Interface (Visual Studio 2012)
https://code.msdn.microsoft.com/office/VSTO-How-to-Customize-4b9d3401

Simple Outlook Add-in with VSTO 3.0
https://blogs.msdn.microsoft.com/jannemattila/2008/04/06/simple-outlook-add-in-with-vsto-3-0

Bitness:

Any CPU is best to ONLY be use pure .NET code applications and not when you have .NET code using COM objects. If you use COM components in your add-in then you need to be sure that you have builds targeted for the platform you are targeting. Not targeting for x86 or x64 may get you into trouble at deployment time. As an example if you use a 32bit COM component on a 32bit version of Windows and 32bit version of outlook while developing you will find that the code may not work on a 64bit system running 32bit version of Outlook if you compile as Any and don't release with 64bit versions of those COM components. Any CPU will be handled as 64bit on a 64bit system and since you cannot mix 32bit COM objects in a 64bit process (or 64bit COM components in a 32bit process) the code will fail. Likewise, if you target your project as x86 and try to use it on a 64bit version of Outlook then it won't work either.

Bitness : How to identify Outlook 2010 installation is a 32-bit or 64-bit?
https://blogs.msdn.microsoft.com/deva/2010/01/21/bitness-how-to-identify-outlook-2010-installation-is-a-32-bit-or-64-bit/

Example: Outlook 14.0 32bit under 64bit Windows 10 the bitness flag is x86 here:

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Office\14.0\Outlook

Example: Outlook 14.0 32bit under 64bit Windows 10 the bitness flag is x86 here:

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Office\16.0\Outlook

64-bit editions of Office 2010 https://technet.microsoft.com/en-us/library/ee681792(office.14).aspx

How to: Check the Version of Outlook https://msdn.microsoft.com/en-us/library/office/dd941331.aspx

How to: Determine Whether Outlook Is a Click-to-Run Application on a Computer https://msdn.microsoft.com/en-us/library/office/ff522355.aspx

Developing Outlook 2010 Solutions for 32-Bit and 64-Bit Systems https://msdn.microsoft.com/en-us/library/office/gg549122(v=office.14).aspx

The newer model for add-ins is Mail Apps for Outlook:

About: Mail Apps for Outlook
https://blogs.msdn.com/b/webdav_101/archive/2015/08/07/about-mail-apps-for-outlook.aspx