forX
Messages postés19Date d'inscriptionmercredi 6 août 2003StatutMembreDernière intervention30 septembre 2011
-
6 sept. 2011 à 21:27
forX
Messages postés19Date d'inscriptionmercredi 6 août 2003StatutMembreDernière intervention30 septembre 2011
-
13 sept. 2011 à 19:14
bonjour, je c que je ne suis pas le premier a poser cette question mais je ne vois pas de réponse
je tente de d'utiliser les event handler de outlook 2003
jai essayer certain truc mais ya rien qui se passe, jai jamais de pop, comme si mes fonction ne marchait pas (aucun event nest pris en compte)
jai redémarrer mon outlook
quelqun en a fait?
que dois-je faire?
dois-je activer quelque chose de spécial?
ajouter un certificat spécifique pour ca?
code dans thisoutlooksession
Private WithEvents MyReminders As Outlook.Reminders
Public WithEvents myOlApp As Outlook.Application
Private Sub Application_Startup()
Set MyReminders = GetOutlookApp.Reminders
End Sub
Function GetOutlookApp() As Outlook.Application
' returns reference to native Application object
Set GetOutlookApp = Outlook.Application
End Function
Private Sub MyReminders_BeforeReminderShow(Cancel As Boolean)
On Error GoTo ErrorHandler
If MsgBox("A reminder would like to display. Do you want to see this reminder?", _
vbYesNo) = vbNo Then
Cancel = Truea
End If
ProgramExit:
Exit Sub
ErrorHandler:
MsgBox Err.Number & " - " & Err.description
Resume ProgramExit
End Sub
Private Sub MyReminders_ReminderAdd(ByVal ReminderObject As Reminder)
On Error GoTo ErrorHandler
Dim itemType As String
Select Case True
Case IsMeeting(ReminderObject), IsAppointment(ReminderObject)
itemType = "AppointmentItem"
Case IsMail(ReminderObject)
itemType = "MailItem"
Case IsContact(ReminderObject)
itemType = "ContactItem"
Case IsTask(ReminderObject)
itemType = "TaskItem"
End Select
MsgBox "This reminder is being added to a " & itemType & " object.", vbInformation
ProgramExit:
Exit Sub
ErrorHandler:
MsgBox Err.Number & " - " & Err.description
Resume ProgramExit
End Sub
Private Sub MyReminders_ReminderFire(ByVal ReminderObject As Reminder)
On Error GoTo ErrorHandler
' auto dismiss reminders, will fire ReminderRemove method
If ReminderObject.IsVisible Then
ReminderObject.Dismiss
End If
ProgramExit:
Exit Sub
ErrorHandler:
MsgBox Err.Number & " - " & Err.description
Resume ProgramExit
End Sub
Public Sub Initialize_handler()
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 " & Item.subject & "?"
If MsgBox(prompt, vbYesNo + vbQuestion, "Sample") = vbNo Then
Cancel = True
End If
End Sub