So do I play my code inside the Application_startup() like this
Public Sub Application_startup()
Private Sub msg_ItemSend(ByVal Item As Object, Cancel As Balloon)
Dim Prompt As String
Prompt = "Are you sure you want to send " & msg.To & " ?"
If MsgBox(Prompt, vbYesNo + vbInformation, "WARNING!!!!! You are
sending to a Distibustion Group") = vbNo Then
Cancel = True
End If
End Sub
End Sub
"Ken Slovak - [MVP - Outlook]" wrote:
No. It would be in the ThisOutlookSessionClass, you would never create an
Outlook.Application object (you use the intrinsic Application object) and
you use Application_Startup, as I said before.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
"Mike "YO_BEE" B" wrote in message
...
would it be something like this under the Class Modules ?
Public Sub Startup()
Set myOlApp = CreateObject("Outlook.Application")
End Sub
Private Sub myOlApp_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim prompt As String
prompt = "Are you sure you want to send " & "?"
If MsgBox(prompt, 4 + 16, "This is a Warning!") = vbNo Then
Cancel = True
End If
End Sub