Lien vers calendrier outlook: couleur du label!

Claudy

XLDnaute Accro
Bonjour,
dans la procédure cidessous, je fais un lien vers MSoutlook, pas de prob ça fonctionne très bien, mais en fonction de la présence ou pas d'un commentaire dans une cellule, je voudrais colorier l'évènnement dans mon calendrier.
Est ce bien la propriété "Label"?
Merci pour votre aide, Claudy

Sub NouveauRDV_Calendrier()
'nécéssite d'activer la référence Microsoft Outlook 10.0 Object Library
Dim myOlApp As New Outlook.Application
Dim MyItem As Outlook.AppointmentItem
Set MyItem = myOlApp.CreateItem(olAppointmentItem)
datein = Worksheets("Horaires").Range("A5000").End(xlUp).Value
With MyItem
.MeetingStatus = 0 'olMeeting
.Subject = " Arrivée" 'CDate(Range("A2").Value) &
.Body = " Arrivée à " & CDate(Format(Worksheets("Horaires").Range("B5000").End(xlUp).Value, "hh:mm:ss")) & _
Chr(10) & zaza & Chr(10) & "Partir à " & CDate(Format(Worksheets("Horaires").Range("C5000").End(xlUp).Value, "hh:mm:ss"))
'.Location = "sur le chat"
.Start = CDate(datein) '#8/7/2006 9:30:00 PM# ' Attention : format mois/jours/année
.Start = .Start + CDate(Format(Worksheets("Horaires").Range("B5000").End(xlUp).Value, "hh:mm:ss"))

'.Duration = 30 'minutes
'.ReminderMinutesBeforeStart = 15
'.ReminderSet = True
''''C'est ici que ça coince!!!!!
If Not Range("B5000").End(xlUp).Comment Is Nothing Then
.Label = "Important"
End If
.Save
End With
 

Discussions similaires

Statistiques des forums

Discussions
312 084
Messages
2 085 194
Membres
102 810
dernier inscrit
mohammedaminelahbali