Historique : OLDureeCategorie

Public Sub CRAB() 👩

' FVA 20060303
' Listage des RDV et de leurs propriétés

' A faire
' * Demander la/les catégorie(s) à filtrer (cf ShowCategoriesDialog)
' * Demander une plage de date
' * Afficher : le nombre de RDV
' * Afficher : la durée des heures pour chaque catégorie
' * Afficher : la durée totale des RDV

Dim myOlApp As Outlook.Application
Dim myNamespace As Outlook.NameSpace
Dim myAppts As Outlook.Items
Dim myItems As Outlook.Items
Dim myItem As Outlook.AppointmentItem

Dim sSEP    As String

    sSEP = ";"

    Set myOlApp = CreateObject("Outlook.Application")
    Set myNamespace = myOlApp.GetNamespace("MAPI")
    Set myItems = myNamespace.GetDefaultFolder(olFolderCalendar).Items
'    Set myItems = myAppts.Restrict("[LastModificationTime] > '01/1/2003'")
'    Set myItems = myItems.Restrict("[Start] = '03/03/2003'")
    For Each myItem In myItems
        Debug.Print myItem.Start & sSEP & myItem.End & sSEP & DateDiff("n", myItem.Start, myItem.End) & sSEP & myItem.Categories
'        myItem.ShowCategoriesDialog
    
    Next

End Sub