user1965813
user1965813

Reputation: 671

Getting API of a third party Outlook COM AddIn

I have a third party COM AddIn that modifies my emails before sending. I would like to interact with it in VBA but do not know the API. Since recording does not appear to be an option 1 I am at a loss as to how to identify my options. How can I learn which methods/objects exist?

Upvotes: 0

Views: 107

Answers (1)

Eugene Astafiev
Eugene Astafiev

Reputation: 49397

It is not possible to interact with third-party COM add-ins until developers disclose their public methods and properties. You may contact add-in developers to get access to their API (if any).

But I'd recommend creating a VBA macro without touching any third-party add-ins. You can handle the ItemSend event of the Application class as well. It is fired whenever an Microsoft Outlook item is sent, either by the user through an Inspector (before the inspector is closed, but after the user clicks the Send button) or when the Send method for an Outlook item, such as MailItem, is used in a program.

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) 
 
 Dim prompt As String 
 
 prompt = "Are you sure you want to send " & Item.Subject & "?" 
 
 If MsgBox(prompt, vbYesNo + vbQuestion, "Sample") = vbNo Then 
 
 Cancel = True 
 
 End If 
 
End Sub

Upvotes: 0

Related Questions