'Can I Access Outlook Add-Ins Through Outlook.Application in my Code?

I'm using Outlook.Application to send emails from my C# code. I have this Voltage Encryption Add-In which allows you to "Send Secure" a message rather than the normal Send.

Can I use this Send Secure in my code? Is there some way to access add-ins?

I can loop through Microsoft.Office.Core.COMAddIns and see that it is there but cannot really do anything with these Add-Ins. Just see basic info about them.

There is an interface exposed by the VoltageAdddIn dll which has the "SendSecureButtonClicked(object ribbonControl)" method. Maybe I can use this somehow?



Solution 1:[1]

If the addin designer did not explicitly give you that ability, you can't. You can access COM addins through the Application.COMAddins collection (you can play with it in OutlookSpy - I am its author - click Application button, select COMAddins property, click Browse, go to the IEnumVariant tab) If addin decides to expose its objects for external consumption, COMAddin.Object property will be != null.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1