![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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 |
Ads |
#2
|
|||
|
|||
![]()
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 |
#3
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
script/macro to send auto reply to sender | ah | Outlook and VBA | 6 | June 22nd 06 05:21 PM |
Rule 'run a script' not running my script | [email protected] | Outlook and VBA | 3 | May 30th 06 01:09 PM |
How to send private messages with this script ON?? | moony marouane | Outlook - Using Forms | 1 | January 30th 06 11:31 AM |
How to send private messages with this script ON?? | moony marouane | Outlook - General Queries | 1 | January 30th 06 11:30 AM |
Outlook Script to Add records to database | JP SIngh | Outlook and VBA | 0 | January 20th 06 05:57 PM |