BrianBellamy
Messages postés24Date d'inscriptionjeudi 9 novembre 2000StatutMembreDernière intervention 1 avril 2005
-
24 mars 2005 à 10:32
DarkCid
Messages postés195Date d'inscriptionmardi 22 février 2005StatutMembreDernière intervention26 octobre 2009
-
24 mars 2005 à 14:25
Cela va faire le 7ème posts que je vais laisser à propos de ce problème. J'ai trouvé sur le site un moyen permettant de m'aider mais pas totalement. Voici le code et en rouge le problème que j'expliquerai juste après:
Private Sub Command31_Click()
Dim myOlApp As Outlook.Application
Dim myNameSpace As Outlook.NameSpace
Dim tdystart As Date
Dim tdyend As Date
Dim myAppointments As Outlook.ItemsDim currentAppointment As Outlook.AppointmentItem <?xml:namespace prefix o ns "urn:schemas-microsoft-com:office:office" />
Set myOlApp = CreateObject("Outlook.Application")
Set myNameSpace = myOlApp.GetNamespace("MAPI")
tdystart = VBA.Format(Date.Value, "Short Date")
tdyend = VBA.Format(Date.Value + 1, "Short Date")
Set myAppointments = myNameSpace.GetDefaultFolder(olFolderCalendar).Items
myAppointments.Sort "[Start]"
myAppointments.IncludeRecurrences = True
Set currentAppointment = myAppointments.Find("[Start] >= """ & tdystart & """ and [Start] <= """ & tdyend & """")
While TypeName(currentAppointment) <> "Nothing"
currentAppointment.Display (.Delete pour la suppression)
Set currentAppointment = myAppointments.FindNext
Wend
End Sub
Le problème est qu'avec ce code, l'heure n'est pas programmable et on es on est obligé de passer par tout les rdv affiché avant d'etre sur celui que l'on veut. Connaissez vous un moyen? Savez vous où je pourrais insérer l'horaire dans ce code?