A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Add-in Send Script



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 26th 06, 11:18 PM posted to microsoft.public.outlook.program_addins
Bob Smith
external usenet poster
 
Posts: 34
Default 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
Ads
  #2  
Old July 27th 06, 07:20 AM posted to microsoft.public.outlook.program_addins
Michael Bauer
external usenet poster
 
Posts: 435
Default 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

  #3  
Old July 27th 06, 09:30 PM posted to microsoft.public.outlook.program_addins
Bob Smith
external usenet poster
 
Posts: 34
Default 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


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 07:59 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-2025 Outlook Banter.
The comments are property of their posters.