Bonjour,
Dans ton outlook, dans ThisOutlookSession
Dim WithEvents colRDVItems As items
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| Private Sub Application_Startup()
'By Oliv ' 2014-04-07
Dim ns As Outlook.NameSpace
Set ns = Application.GetNamespace("MAPI")
Set colRDVItems = ns.Folders("MON BOSS").Folders("Calendrier").items
Set ns = Nothing
'fin section
End Sub
Private Sub colRDVItems_ItemAdd(ByVal Item As Object)
'By Oliv ' 2014-04-07
If Item.Class = olAppointment Then
Dim myRdv As Outlook.AppointmentItem
Set myRdv = Item
Set myMail = myRdv.ForwardAsVcal
myMail.To = "toto@toto.fr;titi@toto.fr"
myMail.Send
End If
End Sub
Private Sub colRDVItems_ItemChange(ByVal Item As Object)
'By Oliv ' 2014-04-07
If Item.Class = olAppointment Then
Dim myRdv As Outlook.AppointmentItem
Set myRdv = Item
Set myMail = myRdv.ForwardAsVcal
myMail.To = "toto@toto.fr;titi@toto.fr"
myMail.Send
End If
End Sub |
Partager