0

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?

N. Pavon
  • 821
  • 4
  • 15
  • 32
Caleb
  • 328
  • 2
  • 10

1 Answers1

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.

Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78
  • Well the object is null... But for those that aren't null how are they accessed? They just return a System.__ComObject which isn't particularly helpful. – Caleb Jun 06 '16 at 17:12
  • You will need to know which particular interface they expose. If the object is IDispatch based and supports type info, OutlookSpy will show its properties and methods (select the Object property, click Browse). – Dmitry Streblechenko Jun 06 '16 at 19:39