Sub Send_Email()
Dim OutlookApp As Outlook.Application
Dim OutlookMail As Outlook.MailItem
Dim chemin As String, fichier As String, Mem_Fichier$
Set OutlookApp = New Outlook.Application
Set OutlookMail = OutlookApp.CreateItem(olMailItem)
Sheets(1).Unprotect
Mail = Application.InputBox("Souhaitez-vous rajouter un commentaire ?", Type:=2)
Sheets("Feuil1").Range("AC21") = Mail
Sheets(1).Protect
If MsgBox("tes vous sur de vouloir envoyer le mail ?", vbYesNo + vbInformation, _
"Attention") = vbYes Then
With OutlookMail
.BodyFormat = olFormatHTML
.Display
.HTMLBody = Range("AC11")
.To = Range("AC10")
.Subject = Range("AC9")
.CC = Range("AC12")
.Send
End With
MsgBox ("Votre Email a été envoyé")
chemin = ThisWorkbook.Path
fichier = chemin & "\" & Range("B4") & ".xlsm"
Mem_Fichier = ActiveWorkbook.FullName
ActiveWorkbook.SaveAs Filename:=fichier
Kill Mem_Fichier
End If
End Sub