![]() |
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
|
|||
|
|||
![]()
hi,
I want to code a small project which can pop up a warning when user click send a email. But it doesnt work for application_itemsend. i work with VS2008, vb. the code is here. Public Class ThisAddIn Public WithEvents myOlApp As Outlook.Application Event ItemSend As AssemblyLoadEventHandler Public Sub Initialize_handler() myOlApp = CreateObject("Outlook.Application") End Sub Private Sub ThisAddIn_Startup(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Startup Initialize_handler() End Sub Private Sub ThisAddIn_Shutdown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shutdown End Sub Private Sub myOlAppEvents_ItemSend(ByVal Item As Object, ByVal 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 End Class Any help is appreciated. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Attach item from another application | LuisE | Outlook and VBA | 5 | January 3rd 08 02:40 PM |
A program is trying to send mail using Item.Send | he.ll.cat | Outlook and VBA | 3 | October 18th 07 09:11 PM |
A program is trying to send mail using Item.Send | rhXX | Outlook - General Queries | 3 | June 17th 07 12:28 AM |
Cannot send outlook 2003 email from other application | Beemer | Outlook - General Queries | 0 | May 6th 07 09:21 AM |
A program is trying to send mail using Item.Send | Vitesh | Outlook and VBA | 1 | January 23rd 06 02:25 PM |