Bonjour,

J'espère qu'une personne ici va déloquer ma situation car je bloque depuis ce matin. J'ai développé le code ci-dessous, il récupère les calendriers outlook et les affiche dans un tableau. Il me manque qu'une seule informations c'est le nombre de personnes qui ont répondu accepté, provisoire ou refusé.

Dans Outlook quand j'ouvre un calendrier, je vois la phrase qu'il me manque en plus la voici (pas d'erreur sur l'orthographe il y a bien écrit ont dans outlook):
1 participant ont accepté, 0 ont accepté provisoirement, 1 ont refusé.
Ce rendez-vous a lieu à une date révolue.


Si quelqu'un peut m'aider, une réponse sera la bienvenue.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
Sub ListAppointments()
 
    Dim olApp As Object
    Dim olNS As Object
    Dim olFolder As Object
    Dim olApt As Object
    Dim NextRow As Long
 
    Cells.Select
    Selection.ClearContents
    Range("A1").Select
 
    Set olApp = CreateObject("Outlook.Application")
 
    Set olNS = olApp.GetNamespace("MAPI")
 
    Set olFolder = olNS.GetDefaultFolder(9) 'olFolderCalendar
 
    Range("A1:AH1").Value = Array("Subject", "Start", "End", "Location", "Body", "Duration", "ForceUpdateToAllAttendees", "GlobalAppointmentID", "IsOnlineMeeting", "IsRecurring", "MeetingStatus", "MeetingWorkspaceURL", "NetMeetingAutoStart", "NetMeetingDocPathName", "NetMeetingOrganizerAlias", "NetMeetingServer", "NetMeetingType", "NetShowURL", "Organizer", "RequiredAttendees", "OptionalAttendees", "RecurrenceState", "ReminderMinutesBeforeStart", "ReplyTime", "Resources", "ResponseRequested", "ResponseStatus", "ClearRecurrencePattern", "GetRecurrencePattern", "Sensitivity", "Size", "Categories", "StartTimeZone", "EndTimeZone")
 
 
    NextRow = 2
 
    'help: http://www.dimastr.com/redemption/RDOAppointmenItem.htm
    'help: http://msdn.microsoft.com/en-us/library/office/cc513841%28v=office.12%29.aspx
    'help: http://msdn.microsoft.com/en-us/library/office/microsoft.office.interop.outlook._appointmentitem_members%28v=office.14%29.aspx
    'help: http://msdn.microsoft.com/en-us/library/exchange/aa564765%28v=exchg.140%29.aspx
 
    For Each olApt In olFolder.Items
        If olApt.Subject Like "**" Then
            Cells(NextRow, "A").Value = olApt.Subject
            Cells(NextRow, "B").Value = olApt.Start
            Cells(NextRow, "C").Value = olApt.End
            Cells(NextRow, "D").Value = olApt.Location
            Cells(NextRow, "E").Value = olApt.Body
            Cells(NextRow, "F").Value = olApt.Duration
            Cells(NextRow, "G").Value = olApt.ForceUpdateToAllAttendees
            Cells(NextRow, "H").Value = olApt.GlobalAppointmentID
            Cells(NextRow, "I").Value = olApt.IsOnlineMeeting
            Cells(NextRow, "J").Value = olApt.IsRecurring
            Cells(NextRow, "K").Value = olApt.MeetingStatus
            Cells(NextRow, "L").Value = olApt.MeetingWorkspaceURL
            Cells(NextRow, "M").Value = olApt.NetMeetingAutoStart
            Cells(NextRow, "N").Value = olApt.NetMeetingDocPathName
            Cells(NextRow, "O").Value = olApt.NetMeetingOrganizerAlias
            Cells(NextRow, "P").Value = olApt.NetMeetingServer
            Cells(NextRow, "Q").Value = olApt.NetMeetingType
            Cells(NextRow, "R").Value = olApt.NetShowURL
            Cells(NextRow, "S").Value = olApt.Organizer
            Cells(NextRow, "T").Value = olApt.RequiredAttendees
            Cells(NextRow, "U").Value = olApt.OptionalAttendees
            Cells(NextRow, "V").Value = olApt.RecurrenceState
            Cells(NextRow, "W").Value = olApt.ReminderMinutesBeforeStart
            Cells(NextRow, "X").Value = olApt.ReplyTime
            Cells(NextRow, "Y").Value = olApt.Resources
            Cells(NextRow, "Z").Value = olApt.ResponseRequested
            Cells(NextRow, "AA").Value = olApt.ResponseStatus
            Cells(NextRow, "AB").Value = olApt.ClearRecurrencePattern
            Cells(NextRow, "AC").Value = olApt.GetRecurrencePattern
            Cells(NextRow, "AD").Value = olApt.Sensitivity
            Cells(NextRow, "AE").Value = olApt.Size
            Cells(NextRow, "AF").Value = olApt.Categories
            Cells(NextRow, "AG").Value = olApt.StartTimeZone
            Cells(NextRow, "AH").Value = olApt.EndTimeZone
            NextRow = NextRow + 1
        End If
    Next olApt
 
    Range("A1").Select
    Selection.AutoFilter
 
    Set olApt = Nothing
    Set olFolder = Nothing
    Set olNS = Nothing
    Set olApp = Nothing
 
    Columns.AutoFit
 
End Sub