Sub envoi()
'variable
Dim a As MailItem
Dim Chemin 'As String, Chm As String
Dim MyFile As String
'création du mail
Set a = Outlook.CreateItem(olMailItem)
Chemin = "C:\" & Replace(Format(Date, "dd/mm/yy"), "/", "_") 'à adapter
If Not Dir(Chemin) = "" Then
MsgBox "Le dossier n'existe pas !"
End If
MyFile = Dir(Chemin & "\*.xls")
With a
.To = "xxxxxxxx@aaaa.fr"
.Subject = "test mail "
.BodyFormat = olFormatHTML
.HTMLBody = "Bonjour, stats du jour."
.Attachments.Add (Chemin & "\" & MyFile)
.Display
'.Send
End With
End Sub