Recherche
Recherche
Les mémos
Je débute...
Visites

 1000538 visiteurs

 1 visiteur en ligne

Lister les tâches d'Outlook

Public Sub ListTaskItems()
    Dim Ol_App As New Outlook.Application
    Dim Ol_MAPI As Outlook.NameSpace
    Dim Ol_Items As Outlook.Items
    Dim Ol_Item As Outlook.TaskItem

    Set Ol_MAPI = Ol_App.GetNamespace("MAPI")
    Set Ol_Items = Ol_MAPI.GetDefaultFolder(olFolderTasks).Items

    For Each Ol_Item In Ol_Items
        If TypeName(OlItem) = "TaskItem" Then
            Debug.Print Ol_Item.Subject, Ol_Item.DueDate, _
                        Ol_Item.StartDate, Ol_Item.DateCompleted
        End If
    Next Ol_Item

    Set Ol_Item = Nothing
    Set Ol_Items = Nothing
    Set Ol_MAPI = Nothing
    Set Ol_App = Nothing
End Sub


Catégorie : Les mémos - Outlook
Page lue 5848 fois