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
| Sub Suivi_demandes_faisa()
Dim olApp As Object, NS As Object, Dossier As Object
Const olFolderInbox = 6
Dim i As Object, R As Object, Ligne As Long
Ligne = 2
Set olApp = CreateObject("Outlook.Application")
Set NS = olApp.GetNamespace("MAPI")
'Set dossiersource = NS.Folders(1).Folders("Boîte de réception")
Set dossiersource = NS.Folders("Maboitemail").Store.GetDefaultFolder(olFolderInbox)
With Sheets("Feuil1")
For Each i In dossiersource.Items
Ligne = Ligne + 1
.Cells(Ligne, 1) = i.Subject
.Cells(Ligne, 2) = i.creationtime
.Cells(Ligne, 3) = i.cc
Next i
End With
Set NS = Nothing
Set olApp = Nothing
End Sub |
Partager