![]() |
Add-in Send Script
I have created an addin but I'm unsure how to declare the code that runs when
someone sends an email. I thought it would be something like this..... Private Sub IDTExtensibility2_OnStartupComplete(custom() As Variant) Dim Application_ItemSend As Outlook.Application End Sub Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) 'Do Stuff End Sub |
Add-in Send Script
Am Wed, 26 Jul 2006 14:18:01 -0700 schrieb Bob Smith:
Bob, "Application" is the object to declare and "ItemSend" is one of its events, which you can use after the declaration. The statement "WithEvents" is necessary to get events: Private WithEvents m_Application as Outlook.Application Private Sub IDTExtensibility2_OnConnection(ByVal Application As Object, _ ByVal ConnectMode As AddInDesignerObjects.ext_ConnectMode, _ ByVal AddInInst As Object, custom() As Variant _ ) Set m_Application=Application End Sub Private Sub m_Application_ItemSend(ByVal Item As Object, Cancel As Boolean) 'Do Stuff End Sub -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.VBOffice.net -- I have created an addin but I'm unsure how to declare the code that runs when someone sends an email. I thought it would be something like this..... Private Sub IDTExtensibility2_OnStartupComplete(custom() As Variant) Dim Application_ItemSend As Outlook.Application End Sub Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) 'Do Stuff End Sub |
Add-in Send Script
Thanks that works!
"Michael Bauer" wrote: Am Wed, 26 Jul 2006 14:18:01 -0700 schrieb Bob Smith: Bob, "Application" is the object to declare and "ItemSend" is one of its events, which you can use after the declaration. The statement "WithEvents" is necessary to get events: Private WithEvents m_Application as Outlook.Application Private Sub IDTExtensibility2_OnConnection(ByVal Application As Object, _ ByVal ConnectMode As AddInDesignerObjects.ext_ConnectMode, _ ByVal AddInInst As Object, custom() As Variant _ ) Set m_Application=Application End Sub Private Sub m_Application_ItemSend(ByVal Item As Object, Cancel As Boolean) 'Do Stuff End Sub -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.VBOffice.net -- I have created an addin but I'm unsure how to declare the code that runs when someone sends an email. I thought it would be something like this..... Private Sub IDTExtensibility2_OnStartupComplete(custom() As Variant) Dim Application_ItemSend As Outlook.Application End Sub Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) 'Do Stuff End Sub |
All times are GMT +1. The time now is 07:08 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com