VBA Automatisation outlook

Bonjour,

Je suis actuellement en train d'automatisé certaine tache sur la mail du travail. Nous travaillons avec Outlook 2010 (Oui on est pas a la page).

J'ai donc créer une petite formule VBA qui télécharge automatiquement la Pièce jointe d'un mail :

Sub PJRapportProduction(Item As Outlook.MailItem) 

 Set attachs = Item.Attachments 

 For Each attach In attachs 

 file = attach.FileName 

 attach.SaveAsFile "C:\Users\BLANCHMAINT\Documents\Blanchisserie\Administratif\Suivi production\" & file 

 Next 

 ReceptionRapportProduction.Show 

 End 

Sub

A la fin cela m'ouvre une UseForm avec un bouton OK et un case cochable "Ouvrir le fichier".

Je souhaiterais donc que lorsque que cette case est coché, le ou les fichier dernièrement télécharger s'ouvre une fois que j'ai cliqué sur ok

Private Sub CommandButton1_Click()  

End Sub  

Private Sub CheckBox1_Click()  

End Sub  

Private Sub CommandButton2_Click()  

'Ferme la fenêtre(ReceptionRapportProduction)'  

Unload Me  

End Sub  

Private Sub Label1_Click()  

End Sub  

Private Sub ToggleButton1_Click()  

End Sub  

Private Sub UserForm_Click()  

End Sub

Merci d'avance

Rechercher des sujets similaires à "vba automatisation outlook"