Outlook - Extraire les pièces jointes des mails

Voici un script VBS pour extraire les pièces jointes des mails :

Set appOutlook = CreateObject("Outlook.Application")
Set objNs = appOutlook.GetNamespace("MAPI")
Set myFolder1 = objNs.Folders("Boîte aux lettres - Utilisateur")
Set myFolder2 = myFolder1.Folders("Dossier")
Set myItems = myFolder2.items
nbItems = myItems.count
For I = 1 To nbItems
    Set myItem = myItems(I)
    For Each Attachment In myItem.Attachments
        Attachment.SaveAsFile "C:\temp\" & I & "-" & Attachment.FileName
    next
next
objNs.Logoff
Set objInbox = Nothing
Set objNs = Nothing
Set appOutlook = Nothing
 
outlook_-_extraire_les_pieces_jointes_des_mails.txt · Dernière modification: 2008/09/30 21:42 par nimda
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki