简体   繁体   中英

How to write an outlook add-in using unmanaged code (C++/Delphi)?

I developed an Outlook Add-in using C#.

I want do completely avoid being punished for slowing down Outlook startup.

Therefore I would like to create a "Loader"-Add-in. It's written in C++/Delphi and does nothing but enabling the C#-Add-in after itself has beeing loaded.

There are a lot of hints on stackoverflow, etc. but no straightforward documentation available.

Questions:

  1. Is there any straightforward documentation about how to write an Outlook Add-in using C++/Delphi?
  2. Is there any documentation about how to write an Add-in which enables a secondary Add-in?

There are no straightforward documentation about how to write an Outlook Add-in using C++/Delphi, because outlook add-ins has two models

  1. VSTO (old) is designed for.Net Framework and c#. Works via COM (Microsoft.Office.Interop.*).
  2. Add-ins is designed for TypeScript (outlook web add-ins).

More about loading VSTO add-in, you can read in Architecture of VSTO Add-ins

So, there are no easy way to write managed dll for VSTO via c++. There are right way is read documentation about VSTO architecture, and solve perfomance problem in loading add-in.

Of course - just implement a creatable COM object that (besides IUnknown ) also exposes _IDTExtensibility2 interface - see https://docs.microsoft.com/en-us/dotnet/api/extensibility.idtextensibility2?view=visualstudiosdk-2019 . You will also need to add its class name to HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\Outlook\Addins .

If you want to support ribbon or task panes, you will aso need to implement IRibbonExtensibility and/or ICustomTaskPaneConsumer interfaces.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM